You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cc -O test.c -o test -I /usr/local/include -I /usr/local/include/libxml2 -L /usr/local/lib -l augeas
Executed under GDB:
Program received signal SIGSEGV, Segmentation fault.
0x000000080084626f in __aug_close_memstream () from /usr/local/lib/libaugeas.so.0
(gdb) where
#0 0x000000080084626f in __aug_close_memstream () from /usr/local/lib/libaugeas.so.0
#1 0x0000000800845f1f in __aug_close_memstream () from /usr/local/lib/libaugeas.so.0
#2 0x00000008008251b0 in aug_save () from /usr/local/lib/libaugeas.so.0
#3 0x000000080082519e in aug_save () from /usr/local/lib/libaugeas.so.0
#4 0x0000000800824f50 in aug_save () from /usr/local/lib/libaugeas.so.0
#5 0x0000000000400af5 in main ()
(gdb)
The text was updated successfully, but these errors were encountered:
Just tested, on Debian 7.7 with libaugeas 0.10.0-1 it does not occur, and with manually built 1.3.0 it does not occur either.
Side note:
This issue was found after trying to re-create an situation where python-augeas sometimes reported success and sometimes reported failure, when trying to aug_save() a file which was not writable by the user running the code.
At first glance, before realising that it was bad permissions that was the cause, it looked very similar to what is described in this post: https://www.redhat.com/archives/augeas-devel/2008-November/msg00000.html . I.e, calling save again "seemed" to work (but most likely did not actually update the file).
I was not able to reproduce this on FreeBSD, but found the above instead.
Hi,
I noticed that aug_save will segfault if the target file is not writeable.
FreeBSD 10.0
augeas 1.2.0 (1.3.0 tested too, same issue)
Minimal test case:
Built with:
Executed under GDB:
The text was updated successfully, but these errors were encountered: