Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 29 Oct 2021 00:10:05 -0300
From: √Črico Nogueira <ericonr@...root.org>
To: <musl@...ts.openwall.com>
Cc: <sebastian_ml@....net>
Subject: Re: Re: freeswitch and musl 1.2.x (time64 most likely)

On Thu Oct 28, 2021 at 6:34 PM -03, Sebastian Kemper wrote:
> Am Thu, Oct 28, 2021 at 10:21:39PM +0200 schrieb Sebastian Kemper:
> >
> > I hope the "optimized out" items aren't too much of an issue. Would be
> > great if you could take a look.
>
> Recompiled with "-O0", now it looks better:
>
> 0x77f55320 in _dlstart () from
> /home/sk/tmp/openwrt/scripts/../staging_dir/target-mips_24kc_musl/root-ath79/lib/ld-musl-mips-sf.so.1
> (gdb) c
> Continuing.
> warning: Could not load shared library symbols for
> /usr/lib/libwolfssl.so.4.8.1.d8795272.
> Do you need "set solib-search-path" or "set sysroot"?
> process 12781 is executing new program: /usr/bin/freeswitch
> warning: Could not load shared library symbols for
> /usr/lib/libwolfssl.so.4.8.1.d8795272.
> Do you need "set solib-search-path" or "set sysroot"?
> [New Thread 12781.12810]
> [New Thread 12781.12782]
> [New Thread 12781.12783]
> [New Thread 12781.12785]
> [New Thread 12781.12796]
> [New Thread 12781.12809]
>
> Thread 2 "freeswitch" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 12781.12810]
> 0x77d7093f in vxprintf (func=0x77d70c71 <mout>, arg=0x76c98a70,
> useExtended=0, fmt=0x77ee2b8e "q'", ap=0x76c98c4c) at
> src/switch_mprintf.c:689
> 689 for (i = n = 0; (ch = escarg[i]) != 0; i++) {
> (gdb) bt
> #0 0x77d7093f in vxprintf (func=0x77d70c71 <mout>, arg=0x76c98a70,
> useExtended=0, fmt=0x77ee2b8e "q'", ap=0x76c98c4c) at
> src/switch_mprintf.c:689
> #1 0x77d70df7 in base_vprintf (xRealloc=0x77d70e6d <printf_realloc>,
> useInternal=0,
> zInitBuf=0x76c98acc "delete from registrations where expires > 0 and
> expires <= 2012362356 and hostname='", nInitBuf=350,
> zFormat=0x77ee2b40 "delete from registrations where expires > 0 and
> expires <= %ld and hostname='%q'", ap=0x76c98c44) at
> src/switch_mprintf.c:860
> #2 0x77d70f81 in switch_mprintf (zFormat=0x77ee2b40 "delete from
> registrations where expires > 0 and expires <= %ld and hostname='%q'")
> at src/switch_mprintf.c:903
> #3 0x77d8d395 in switch_core_expire_registration (force=0) at
> src/switch_core_sqldb.c:3554

Line 3554 is:

		sql = switch_mprintf("delete from registrations where expires > 0 and expires <= %ld and hostname='%q'", now, switch_core_get_switchname());

It's using '%ld' for 'now', which is time_t. Will add a commit to fix it
in my PR. Replace with '%lld' if you want to do a quick fix to see if
you catch any other errors.

> #4 0x77d85975 in switch_core_sql_db_thread (thread=0x770b9ee0, obj=0x0)
> at src/switch_core_sqldb.c:1538
> #5 0x77ec5f19 in dummy_worker (opaque=0x770b9ee0) at
> threadproc/unix/thread.c:151
> #6 0x77fc5014 in start (p=0x76c98d54) at src/thread/pthread_create.c:203
> #7 0x77f5523c in __clone () at src/thread/mips/clone.s:33
> Backtrace stopped: frame did not save the PC
> (gdb)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.