Martin J. O'Riordan via llvm-dev
2016-Jun-04 10:27 UTC
[llvm-dev] Adding source location information to crash dumps
Awful though it may seem, we sometimes do get crashes in the compiler, usually because of some unhandled scenario we never thought of. Unfortunately this typically happens when compiling very large pieces of code, so narrowing down the context of the crash can be difficult. When CLang/LLVM crashes it very helpfully creates a temporary pre-processed file along with a shell script to run this file so the issue can be reproduced. And when run there is (usually) a call-stack dump, particularly when the Debug build is run. But I would also like to have a clue about what file and line in the test-case corresponds to the context in which the crash occurs. Is there any easy way of adding the ability to write the 'DebugLoc' information corresponding to the context or the crash, or is this information not available to the crash-handler? Thanks, MartinO -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160604/116616ae/attachment.html>
Yaron Keren via llvm-dev
2016-Jun-04 18:05 UTC
[llvm-dev] Adding source location information to crash dumps
We use creduce to reduce large crash code to a small example, https://embed.cs.utah.edu/creduce/ Then you can run clang under a debugger compiling the small example and actually understand the crash. 2016-06-04 13:27 GMT+03:00 Martin J. O'Riordan via llvm-dev < llvm-dev at lists.llvm.org>:> Awful though it may seem, we sometimes do get crashes in the compiler, > usually because of some unhandled scenario we never thought of. > Unfortunately this typically happens when compiling very large pieces of > code, so narrowing down the context of the crash can be difficult. > > > > When CLang/LLVM crashes it very helpfully creates a temporary > pre-processed file along with a shell script to run this file so the issue > can be reproduced. And when run there is (usually) a call-stack dump, > particularly when the Debug build is run. > > > > But I would also like to have a clue about what file and line in the > test-case corresponds to the context in which the crash occurs. Is there > any easy way of adding the ability to write the ‘DebugLoc’ information > corresponding to the context or the crash, or is this information not > available to the crash-handler? > > > > Thanks, > > > > MartinO > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160604/9aa9026a/attachment.html>
Martin J. O'Riordan via llvm-dev
2016-Jun-04 20:58 UTC
[llvm-dev] Adding source location information to crash dumps
Perfect, thanks From: Yaron Keren [mailto:yaron.keren at gmail.com] Sent: 04 June 2016 19:06 To: Martin J. O'Riordan <Martin.ORiordan at movidius.com> Cc: LLVM Developers <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Adding source location information to crash dumps We use creduce to reduce large crash code to a small example, https://embed.cs.utah.edu/creduce/ Then you can run clang under a debugger compiling the small example and actually understand the crash. 2016-06-04 13:27 GMT+03:00 Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> >: Awful though it may seem, we sometimes do get crashes in the compiler, usually because of some unhandled scenario we never thought of. Unfortunately this typically happens when compiling very large pieces of code, so narrowing down the context of the crash can be difficult. When CLang/LLVM crashes it very helpfully creates a temporary pre-processed file along with a shell script to run this file so the issue can be reproduced. And when run there is (usually) a call-stack dump, particularly when the Debug build is run. But I would also like to have a clue about what file and line in the test-case corresponds to the context in which the crash occurs. Is there any easy way of adding the ability to write the ‘DebugLoc’ information corresponding to the context or the crash, or is this information not available to the crash-handler? Thanks, MartinO _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160604/c1c9d3b1/attachment.html>
Reasonably Related Threads
- Dumping the static stack reservation sizes for functions
- Dumping the static stack reservation sizes for functions
- Dumping the static stack reservation sizes for functions
- SmallString + raw_svector_ostream combination should be more efficient
- [LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?