aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-10-09 02:25:40 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-10-09 23:29:41 +0200
commit6837969854ad688dec4801c0af5831cf4f9a2de0 (patch)
treef950b40c5bf5bebf83a11aa7aa6658725e3b8874 /Documentation
parent84bf658e2bedde92f3bd3f2285e6350f8cf60339 (diff)
downloadsparse-dev-6837969854ad688dec4801c0af5831cf4f9a2de0.tar.gz
"graph" segfaults on top-level asm
The "graph" binary segfaults on this input: asm(""); with gdb saying (edited for clarity): Program received signal SIGSEGV, Segmentation fault. in graph_ep (ep=0x7ffff7f62010) at graph.c:52 (gdb) p ep->entry $1 = (struct instruction *) 0x0 Sadly, the commit that introduced this crash: 15fa4d60e ("topasm: top-level asm is special") was (part of a bigger series) meant to fix crashes because of such toplevel asm statements. Toplevel ASM statements are quite abnormal: * they are toplevel but anonymous symbols * they should be limited to basic ASM syntax but are not * they are given the type SYM_FN but are not functions * there is nothing to evaluate or expand about it. These cause quite a few problems including crashes, even before the above commit. So, before handling them more correctly and instead of adding a bunch of special cases here and there, temporarily take the more radical approach of stopping to add them to the list of toplevel symbols. Fixes: 15fa4d60ebba3025495bb34f0718764336d3dfe0 Reported-by: Vegard Nossum <vegard.nossum@gmail.com> Analyzed-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions