Page MenuHomePhabricator

Fix uninitialized value in ABIArgInfo
ClosedPublic

Authored by serge-sans-paille on Jan 31 2019, 9:35 AM.

Details

Summary

GCC-9 takes advantage of this uninitialized values to optimize stuff, which ends up in failing validation when compiling clang.

This fixes https://bugs.llvm.org/show_bug.cgi?id=40547

Diff Detail

Repository
rL LLVM

Event Timeline

hans accepted this revision.Feb 20 2019, 3:17 AM

I've been staring at this, trying to figure out if the code somehow ends up using the uninitialized values, but I can't find it. So either it's hard to find, or GCC is doing something wrong.

But anyway, I think committing your change makes sense, but I think don't think we can say "Fix uninitialized value in ABIArgInfo", because it's not clear what needs fixing. Instead, I'd say "Always initialize the members in ABIArgInfo". That kind of makes sense in itself as it makes the code safer and possibly simpler, and of course it's also good that it fixes this problem.

What do you think?

This revision is now accepted and ready to land.Feb 20 2019, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2019, 3:17 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript

@hans agreed; Thanks for taking the time to try to reproduce the original issue o/

Closed by commit rL354546: [NFC] Always initialize all members in ABIArgInfo (authored by serge_sans_paille, committed by ). · Explain WhyFeb 20 2019, 8:55 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2019, 8:55 PM