This is an archive of the discontinued LLVM Phabricator instance.

[Docs] Update HowToSubmitABug
ClosedPublic

Authored by aeubanks on Jan 27 2021, 4:31 PM.

Details

Summary

With the new PM imminent, bugpoint will diverge from opt, meaning it may
not reproduce a crash with the same arguments passed to opt. We need to
specify alternatives to bugpoint for reducing crashes.

I looked at the rest of the document to see if anything could be
improved. Major highlights:

  • Run -Xclang -disable-llvm-passes instead of -O0 for skipping IR passes
  • Mention the files that clang dumps on a crash
  • Remove outdated reference to delta and plug creduce instead
  • Mention llvm-reduce on top of bugpoint
  • Mention --print-before-all --print-module-scope
  • Mention sanitizers in addition to valgrind
  • Mention opt-bisect for miscompiles

Diff Detail

Event Timeline

aeubanks requested review of this revision.Jan 27 2021, 4:31 PM
aeubanks created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2021, 4:31 PM
xbolva00 added inline comments.
llvm/docs/HowToSubmitABug.rst
79

maybe mention cvise too? Should be better than creduce.

https://github.com/marxin/cvise

llvm/docs/HowToSubmitABug.rst
94

Worth mentioning that -Xclang -disable-O0-optnone can disable emitted optnone.

134

I only use --print-module-scope with -filter-print-funcs...

165

Perhaps also: -fsanitize=address,undefined && -fsanitize=memory

MaskRay added inline comments.Jan 27 2021, 4:47 PM
llvm/docs/HowToSubmitABug.rst
75

Perhaps your toolchain has changed the default. For many *NIX platforms I think this is just /tmp/foo-xxxxx.c

aeubanks updated this revision to Diff 319722.Jan 27 2021, 5:08 PM

address comments

aeubanks marked 2 inline comments as done.Jan 27 2021, 5:11 PM
aeubanks added inline comments.
llvm/docs/HowToSubmitABug.rst
94

I think that's too much information. Clang can generate different code for -O0 than -O1 and above even besides the optnone attribute.

134

-print-before-all won't print the entire module before a function pass, and you need the whole module.

165

added a link to sanitizers and mentioned -fsanitize=address,undefined. I'm worried about msan because you need to build the C++ standard library with it, or else you get false positives. It's discoverable through the link anyway.

MaskRay accepted this revision.Feb 2 2021, 9:57 AM

LG, but you may need to add more CCes to get wider audience for their experiences on troubleshooting and wait a day or two. If people want to contribute after this is submitted, they can send separate patches.

This revision is now accepted and ready to land.Feb 2 2021, 9:57 AM
fhahn accepted this revision.Feb 2 2021, 1:24 PM

Thanks for the update, LGTM

llvm/docs/HowToSubmitABug.rst
69

nit: `clang` (in double ticks) ?

aeubanks updated this revision to Diff 320929.Feb 2 2021, 3:21 PM

address comments

MaskRay added inline comments.Feb 2 2021, 4:05 PM
llvm/docs/HowToSubmitABug.rst
107

Might worth a link to the bugpoint documentation page.

aeubanks updated this revision to Diff 320942.Feb 2 2021, 4:15 PM

add links to bugpoint

This revision was landed with ongoing or failed builds.Feb 2 2021, 9:20 PM
This revision was automatically updated to reflect the committed changes.