Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO2+NUAZjYFVvOtPNhqG+poUFVEqo1VBAqK-O_12G0dqXRnvCQ@mail.gmail.com>
Date: Mon, 4 Mar 2019 14:15:27 +0300
From: Леонид Юрьев <leo@...iev.ru>
To: musl@...ts.openwall.com
Subject: Wrong __assert_fail(signed/unsigned) prototype

Hi!

LSB 1.3...3.0 as well as  ISO POSIX (2003) specifies:
void __assert_fail(const char *assertion, const char *file, unsigned
int line, const char *function);

But now MUSL defines:
_Noreturn void __assert_fail (const char *, const char *, int, const char *);

I.e. the problem is "int" and "unsigned int" type difference for
"line" argument.
This creates build problems if the __assert_fail() prototype is also
defined in the application source code.

Of cause, such (re)definition of __assert_fail() is not the good
solution, but the simplest, since the __assert_fail() prototype may
not be defined.

However, I think it's better to align __assert_fail() with POSIX and
LSB specifications.

Regards,
Leonid.

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.