FS#10056 - Writing different logfiles
Attached to Project:
Pacman
Opened by Georg Grabler (STiAT) - Tuesday, 01 April 2008, 22:16 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 02 April 2008, 01:40 GMT
Opened by Georg Grabler (STiAT) - Tuesday, 01 April 2008, 22:16 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 02 April 2008, 01:40 GMT
|
Details
Summary and Info:
When writing different logfiles, using alpm_logaction, setting a new logfile, alpm crashes. Steps to Reproduce: Compiled the attaced test program with gcc test.c -o test -lalpm using lalpm 3.1.3 Errors: produces the error (attached test.log) According backtrace using (see attached file gdb.log) Symptom: -> The first log message is written normally -> The 2nd isn't written at all (strange) -> On the 3rd call it crashes when calling alpm_option_set_logfile Addition: I don't exactly know how gcc handles this, but as i know free() must not automatically set the pointer to NULL. This would make the check for handle->logfile quite unnecessary, unless it's set to NULL in this function, because except re-initializing alpm there is no possibility to do so. Just in between: I don't know how GCC handles this, but I know that it's not common that free() sets a pointer to NULL, which would mean the alpm_option_set_logfile needs a handle->logfile = NULL after the free(handle->logfile). |
This task depends upon
Closed by Dan McGee (toofishes)
Wednesday, 02 April 2008, 01:40 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in commit ab9187d07de03e6545881a72180e76e728317bb9
Wednesday, 02 April 2008, 01:40 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in commit ab9187d07de03e6545881a72180e76e728317bb9
Comment by Georg Grabler (STiAT) -
Tuesday, 01 April 2008, 22:21 GMT
ups, last line double :-) ... but to make sure you know what I
mean <sigh>, reports 5 min before bed time :-(.
Comment by Dan McGee (toofishes) -
Tuesday, 01 April 2008, 22:48 GMT
This will get fixed in 3.1.4, its a simple oversight with a simple
fix.
test.c