Bug #13462
closedctags crashes building full illumos tag table
100%
Description
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
Related issues
Updated by Rich Lowe over 2 years ago
- Related to Bug #13461: xref should use the etags and ctags that are found in path (perhaps even default to ectags) added
Updated by Rich Lowe over 2 years 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 Rich Lowe over 2 years ago
And because escaping of quotes is mis-implemented.
Updated by Electric Monk over 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 45dce8f04affdadfb6a71ff8b651688af9c856c6
commit 45dce8f04affdadfb6a71ff8b651688af9c856c6 Author: Richard Lowe <richlowe@richlowe.net> Date: 2021-02-12T23:11:04.000Z 13462 ctags crashes building full illumos tag table Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gordon.ross@tintri.com>