[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev dev11 core dump in LYEdit.c under DJGPP
From: |
Leonid Pauzner |
Subject: |
Re: lynx-dev dev11 core dump in LYEdit.c under DJGPP |
Date: |
Sat, 26 Dec 1998 01:00:15 +0300 (MSK) |
>>
>> The new problem appears a couple of dev versions ago:
>> when I look localfile with DJGPP port and press 'e' to edit the file
>> I got a crash immediately.
>>
>> gdb shows a crash from extra free() in
>> edit_current_file() at LYEdit.c:129 (quoted below):
> thanks (will check/fix)
>> #ifdef __DJGPP__
>> sprintf(command, "%s %s", editor, HTDOS_name(filename));
>> #else
>> sprintf(command, "%s \"%s\"", editor, HTSYS_name(filename));
>> #endif /* __DJGPP__ */
>> #endif /* VMS */
>> CTRACE(tfp, "LYEdit: %s\n", command);
>> CTRACE_SLEEP(MessageSecs);
>> #ifndef __EMX__
>> ----> FREE(filename);
>> #endif
>>
>> /*
>> * Invoke the editor. - FM
>>
>>
>> I change the condition to
>> #if !defined(__EMX__) && !defined(__DJGPP__)
>> and it works OK but I do not know the origin of the problem
>> so expect problems elsewhere.
> well, it doesn't seem to be directly related to the HTSprintf changes.
> Perhaps I moved an ifdef.
No. I checked against 2.8.1rel:
LYEdit.c, HTSYS_name(), HTDOS_name() was not changed but the problem come.
Probably certain memory problems was hidden until you change something.
In fact, HTSYS_name() equivalent to HTDOS_name() for __EMX__ and DOSPATH,
but HTDOS_name() do the odd thing - it returns a pointer to initial argument
which is modified. This is not intended for HTVMS_name() so we got
HTDOS_name() argument converted several times in edit_current_file()
and possibly other places. Should we fix HTDOS_name ?
Trace have the folowing entries:
HTParse: result:/c:/lynx/dist28/lynx2-8-/src/chrtrans/cp1250_u.h
HTDOS_name changed `c:/lynx/dist28/lynx2-8-/src/chrtrans/cp1250_u.h' to
`c:\lynx\dist28\lynx2-8-\src\chrtrans\cp1250_u.h'
HTDOS_name changed `c:\lynx\dist28\lynx2-8-\src\chrtrans\cp1250_u.h' to
`c:\lynx\dist28\lynx2-8-\src\chrtrans\cp1250_u.h'
> --
> Thomas E. Dickey