When an CVS Entries file contains a D///// entry, gCvs
The attached fix prevents such entries from being
handled at all, by preventing new Nodes from being created.
Fix crash when CVS Entry file contains D///// entry
Logged In: YES
How do you get the "D/////" entries?
According to CVS documentation it should either be single D or D/name/filler1/filler2/filler3/filler4 (where fillers are blank so you get D/name////).
Logged In: YES
>How do you get the "D/////" entries?
They are created by another "CVS-enabled" application. You are right, the D///// entries shouldn't be there, however for the sake of robustness, gCVS shouldn't crash.
Can you tell where exactly does it crash?
I tried to put this kind of entry and WinCvs doesn't crash, so I can put this patch as conditional compilation for gCvs only but I am not happy with strcmp there - maybe a better fix can be found?
I will try to reproduce the problem and send a gdb backtrace.
This is the backtrace of the crash. It occurs when entering a directory whose Entries-file contains the D///// entry.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912497445056 (LWP 9411)]
0x0000003ef8274042 in strcmp () from /lib64/libc.so.6
#0 0x0000003ef8274042 in strcmp () from /lib64/libc.so.6
#1 0x000000000046ed67 in Entries_Open (entries=@0x752ba0,
fullpath=0x7b2a40 "/home/rli/devel/ICOSOFT/PROJECTS/Components/I/IcoscriptComponent/Library/icoscript") at SortList.h:250
#2 0x000000000045b111 in TViewFill::EnterDirectory (this=Variable "this" is not available.
#3 0x0000000000474849 in FileTraverse (
path=0x7b2a40 "/home/rli/devel/ICOSOFT/PROJECTS/Components/I/IcoscriptComponent/Library/icoscript", report=@0x7fff07fe6490, macDirSpec=Variable "macDirSpec" is not available.
#4 0x00000000004561f2 in UCvsFiles::ResetView (this=0x752ac0,
forceReload=true, notifyBrowser=false) at UCvsFiles.cpp:524
#5 0x0000000000456af4 in UCvsFiles::ResetView (this=0x752ac0,
path=0x7b34d0 "/home/rli/devel/ICOSOFT/PROJECTS/Components/I/IcoscriptComponent/Library/icoscript", notifyBrowser=true) at UCvsFiles.cpp:428
#6 0x00000000004593e2 in UCvsFiles::EditSel (this=0x752ac0, data=0x7bbb10,
useDefault=Variable "useDefault" is not available.
) at UCvsFiles.cpp:1900
#7 0x000000000045947e in UCvsFiles::OnDblClick (this=0x752ac0)
#8 0x000000000049eceb in UCmdTarget::UDispatchMessage (this=0x752ac0, evt=71,
arg1=0, arg2=0x0, dispatchInfo=@0x7fff07fe669c) at uevent.cpp:357
#9 0x000000000049f406 in UEventSendMessage (wid=4, evt=71, arg1=0, arg2=0x0)
---Type <return> to continue, or q <return> to quit---
#10 0x00000000004a30c8 in gtkclistdblclick (widget=Variable "widget" is not available.
) at uwidget.cpp:269
#11 0x0000003ef91a934e in gtk_marshal_BOOL__POINTER ()
#12 0x0000003ef91d8e87 in gtk_signal_handler_block ()
#13 0x0000003ef91db4be in gtk_signal_new () from /usr/lib64/libgtk-1.2.so.0
#14 0x0000003ef91dbc6b in gtk_signal_emit () from /usr/lib64/libgtk-1.2.so.0
#15 0x0000003ef9211a73 in gtk_widget_event () from /usr/lib64/libgtk-1.2.so.0
#16 0x0000003ef91a78c0 in gtk_propagate_event ()
#17 0x0000003ef91a8662 in gtk_main_do_event () from /usr/lib64/libgtk-1.2.so.0
#18 0x00000000004a5409 in gtkmaindoevent (event=0x831738) at uwidget.cpp:214
#19 0x0000003ef9d1b29d in gdk_events_init () from /usr/lib64/libgdk-1.2.so.0
#20 0x0000003ef9b12d0a in g_main_add_poll () from /usr/lib64/libglib-1.2.so.0
#21 0x0000003ef9b134a5 in g_get_current_time ()
#22 0x0000003ef9b136df in g_main_run () from /usr/lib64/libglib-1.2.so.0
#23 0x0000003ef91a8b72 in gtk_main () from /usr/lib64/libgtk-1.2.so.0
#24 0x000000000044eda1 in main (argc=1, argv=0x7fff07fe7128) at main.cpp:142
Entries_Open looks like a better point of attack then, maybe something like would do?:
bool Entries_Open(CSortList<ENTNODE>& entries, const char* fullpath)
string adminPath(fullpath ? fullpath : "");
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.