[prev in list] [next in list] [prev in thread] [next in thread]
List: haiku-bugs
Subject: [haiku-bugs] Re: [Haiku] #10803: gcc wrongly optimizes NULL check in strdup.
From: "pulkomandy" <trac () haiku-os ! org>
Date: 2014-04-30 13:19:31
Message-ID: 061.062a85bcbb48690a6703e1aaae025e6c () haiku-os ! org
[Download RAW message or body]
#10803: gcc wrongly optimizes NULL check in strdup.
---------------------------------+----------------------------
Reporter: pulkomandy | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: System/libroot.so | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
---------------------------------+----------------------------
Comment (by pulkomandy):
I understood why the issue popped up for me: I didn't re-run configure
following the clang support changes. So HAIKU_CC_IS_CLANG is not properly
set here, and there is a guard preventing -fno-tree-vrp to be added to the
flags.
Anyway, shouldn't we enable tree-vrp and disable the built-in strdup
instead? It sounds like things would crash if they use the builtin, no
matter if the optimization is enabled.
I don't see anything in the POSIX spec that explicitly disallows handling
NULL pointers. There's the possible performance problem, still, which may
be a valid reason for omitting it...
--
Ticket URL: <https://dev.haiku-os.org/ticket/10803#comment:5>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic