ctags crashes building full illumos tag table
core '18036.core' of 18036: /usr/bin/ctags -wt /dev/null lib/librsm/inc/rsmlib_in.h lib/librsm/inc
08052e30 Y_entries (feb5e475, 4290009, 0, 0, 0, 101204) + b0
08053de9 find_entries (85435f0, 8415e18, 7f538c8, 8053f1d, 806502c, feb2a498) + 1ec
08053f3c main (7f538cc, fec685c8, 7f53908, 8051ae7, 664e, 7f53938) + 11d
08051ae7 _start_crt (664e, 7f53938, f31d6c9f, 0, 0, 0) + 96
080519ba _start (664e, 7f6d3f0, 7f6d3ff, 7f6d403, 7f6d40d, 7f6d428) + 1a
when running xref -x ctags in usr/src. We're reading a bad pointer
Updated by Rich Lowe over 1 year ago
- Status changed from New to In Progress
- Assignee set to Rich Lowe
This is because ctags is the purest of feculence, but more specifically because when we encounter a yacc rule where the terminating : is on a newline, we consumer the NUL at the end of the previous line, and wander off into space.
We also access a parse node immediately after freeing it.
We also copy into a buffer at least 4 times smaller than its source.
I've tested the fix by building illumos tag tables and by building a tag table for the previously problematic file specifically
Updated by Electric Monk over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit 45dce8f04affdadfb6a71ff8b651688af9c856c6 Author: Richard Lowe <firstname.lastname@example.org> Date: 2021-02-12T23:11:04.000Z 13462 ctags crashes building full illumos tag table Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Gordon Ross <email@example.com>