Support #493

Updated by Madars over 4 years ago

For example got segmentation fault:

<pre>
$ gdb exencrypt core.16932
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/exencrypt...(no debugging symbols found)...done.
[New LWP 16932]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Core was generated by `exencrypt eeeee'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007fb48bfe3681 in __strlen_sse2_pminub () from /usr/lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install endurox-7.0.5-1.x86_64
(gdb) where
#0 0x00007fb48bfe3681 in __strlen_sse2_pminub () from /usr/lib64/libc.so.6
#1 0x00007fb48cdc3808 in handler (cf_ptr=0x1fd2aa0, vsection_start_with=<optimized out>, cfg_ptr=<optimized out>, section=0x7ffff3a6226d "${SOMEENV}", name=0x2 <Address 0x2 out of bounds>, value=0x0)
at /home/user1/endurox/libnstd/inicfg.c:297
#2 0x00007fb48d2ae861 in ini_parse_stream () from /usr/lib64/libsnoopy.so
#3 0x00007fb48d2ae97c in ini_parse () from /usr/lib64/libsnoopy.so
#4 0x00007fb48cdc2c86 in _ndrx_inicfg_load_single_file (cfg=cfg@entry=0x1fc0150, resource=resource@entry=0x7ffff3a69a18 "/home/user1/conf/ndrxconf.ini",
fullname=fullname@entry=0x7ffff3a69a18 "/home/user1/conf/ndrxconf.ini", section_start_with=section_start_with@entry=0x7fb48cff3a60 <M_sections_first_pass>) at /home/user1/endurox/libnstd/inicfg.c:437
#5 0x00007fb48cdc4a5e in _ndrx_inicfg_update_single_file (cfg=cfg@entry=0x1fc0150, resource=resource@entry=0x7ffff3a69a18 "/home/user1/conf/ndrxconf.ini",
fullname=fullname@entry=0x7ffff3a69a18 "/home/user1/conf/ndrxconf.ini", section_start_with=section_start_with@entry=0x7fb48cff3a60 <M_sections_first_pass>) at /home/user1/endurox/libnstd/inicfg.c:537
#6 0x00007fb48cdc4b95 in _ndrx_inicfg_add (cfg=0x1fc0150, resource=0x7ffff3a69a18 "/home/user1/conf/ndrxconf.ini", section_start_with=section_start_with@entry=0x7fb48cff3a60 <M_sections_first_pass>)
at /home/user1/endurox/libnstd/inicfg.c:579
#7 0x00007fb48cdc4df4 in ndrx_inicfg_add (cfg=<optimized out>, resource=<optimized out>, section_start_with=section_start_with@entry=0x7fb48cff3a60 <M_sections_first_pass>)
at /home/user1/endurox/libnstd/inicfg.c:1194
#8 0x00007fb48cdc5300 in _ndrx_cconfig_load_pass (cfg=cfg@entry=0x7ffff3a63668, is_internal=is_internal@entry=1, section_start_with=section_start_with@entry=0x7fb48cff3a60 <M_sections_first_pass>)
at /home/user1/endurox/libnstd/cconfig.c:327
#9 0x00007fb48cdc5657 in _ndrx_cconfig_load (cfg=cfg@entry=0x7fb48cff5890 <G_cconfig>, is_internal=1) at /home/user1/endurox/libnstd/cconfig.c:223
#10 0x00007fb48cdc574e in _ndrx_cconfig_load (is_internal=1, cfg=0x7fb48cff5890 <G_cconfig>) at /home/user1/endurox/libnstd/cconfig.c:425
#11 ndrx_cconfig_load () at /home/user1/endurox/libnstd/cconfig.c:433
#12 0x00007fb48cdc5959 in ndrx_get_G_cconfig () at /home/user1/endurox/libnstd/cconfig.c:493
#13 0x00007fb48cdbbf70 in ndrx_init_debug () at /home/user1/endurox/libnstd/ndebug.c:618
#14 0x0000000000400be5 in main () -----Original Message-----

</pre>

all ini.h functions must have some prefix like ndrx_, to have private namespace...

Back