[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-indent] Segfault
From: |
indent |
Subject: |
[Bug-indent] Segfault |
Date: |
Mon, 13 Sep 2004 14:35:58 -0700 |
I'm getting segfaults on about twenty of the files I'm trying to
process with indent. I have indent 2.2.9 on OS X 10.3.5 and am running
gnu indent with these options (and no profile)
-br -brs -cdw -l76 -lc76 -pi1 -sc -nut -bap
I've gone through the debugger a little for several of the files. All
the one's I've checked have a stack trace like:
#0 current_column () at io.c:221
#1 0x00008b8c in print_comment (paren_targ=0x1292c) at comments.c:263
#2 0x00007064 in indent_main_loop () at indent.c:2712
#3 0x000077c8 in indent_single_file (using_stdin=0 '\0') at
indent.c:3021
#4 0x00007854 in indent_all (using_stdin=177 '?') at indent.c:3048
#5 0x0000796c in main (argc=95912, argv=0x176a8) at indent.c:3108
The problem seems to be that p is set to cur_line which is usually
something like 0x33bb5, however buf_ptr is around 0x1800e04, so the
while loop continue way too long. I haven't yet figured out what the
cause of this could be.
Attached is the smallest of the files I'm having trouble with.
tactrans.c
Description: Text document
For this file, buf_ptr is:
$16 = 0x1800e04 " only happens for shofixti self-destruct */"
and cur_line is:
$17 = 0x30ac3 " {\n\n\tPlaySound (SetAbsSoundIndex
(\n\t\tStarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1\n\t\t),
GAME_SOUND_PRIORITY + 1);\n\n\tDeltaCrew ((ELEMENTPTR)ShipPtr,
-(SIZE)ShipPtr->crew_level);\n\tif (Victorious"...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-indent] Segfault,
indent <=