From: Sebastian Kemper <sebastian_ml@gmx.net>
To: musl@lists.openwall.com
Cc: "Szabolcs Nagy" <nsz@port70.net>,
"Érico Nogueira" <ericonr@disroot.org>,
"Rich Felker" <dalias@libc.org>
Subject: Re: [musl] Re: freeswitch and musl 1.2.x (time64 most likely)
Date: Sat, 30 Oct 2021 12:57:05 +0200 [thread overview]
Message-ID: <YX0lASS/p+GXKrVm@darth.lan> (raw)
In-Reply-To: <20211030010040.GZ7074@brightrain.aerifal.cx>
Am Fri, Oct 29, 2021 at 09:00:43PM -0400 schrieb Rich Felker:
> On Sat, Oct 30, 2021 at 12:44:05AM +0200, Sebastian Kemper wrote:
> > Breakpoint 3 (apr_time_now) pending.
> > (gdb) c
> > Continuing.
> >
> > Breakpoint 1, time (p=0x7fffac90) at compat/time32/time32.c:7
> > 7 {
> > (gdb) next
> > 8 time_t t = time(0);
> > (gdb)
> > 9 if (t < INT32_MIN || t > INT32_MAX) {
> > (gdb)
> > 13 if (p) *p = t;
> > (gdb)
> > 14 return t;
> > (gdb)
> > test_now (tc=0x7fffacd0, data=0x0) at testtime.c:66
> > 66 timediff = os_now - (current / APR_USEC_PER_SEC);
> > (gdb) p os_now
> > $1 = 7024617916842658549
> > (gdb) p current
> > $2 = 1635546302107561
> > (gdb) p APR_USEC_PER_SEC
> > $3 = 1000000
> > (gdb) c
> > Continuing.
> > [Inferior 1 (process 15506) exited with code 01]
>
> This function should not be being called. It's only for ABI-compat
> with old time32 binaries.
OK. I made a fresh clone from OpenWrt and build from scratch. Now when I
run the test program it segfault when trying to get APR time. I'll
follow up with that later today.
Maybe I had some old libtool cruft lying around, I don't know.
>
> > So OS time is correct. Something not working right with apr.
>
> Likely it is doing something bad bypassing the system headers and
> declaring gettimeofday (wrongly) itself...
I looked at APR source but it doesn't seem to redefine gettimeofday. It
only uses it here:
APR_DECLARE(apr_time_t) apr_time_now(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec * APR_USEC_PER_SEC + tv.tv_usec;
}
Will let you all know how it goes :) Thanks again!
>
> Rich
next prev parent reply other threads:[~2021-10-30 10:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 22:16 [musl] " Sebastian Kemper
2021-10-27 23:24 ` Érico Nogueira
2021-10-28 20:21 ` [musl] " Sebastian Kemper
2021-10-28 21:34 ` Sebastian Kemper
2021-10-29 3:10 ` Érico Nogueira
2021-10-29 14:40 ` Sebastian Kemper
2021-10-29 21:04 ` Szabolcs Nagy
2021-10-29 22:44 ` Sebastian Kemper
2021-10-30 1:00 ` Rich Felker
2021-10-30 10:57 ` Sebastian Kemper [this message]
2021-10-30 17:56 ` Rich Felker
2021-10-30 19:07 ` Sebastian Kemper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YX0lASS/p+GXKrVm@darth.lan \
--to=sebastian_ml@gmx.net \
--cc=dalias@libc.org \
--cc=ericonr@disroot.org \
--cc=musl@lists.openwall.com \
--cc=nsz@port70.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).