[haiku-bugs] Re: [Haiku] #10803: gcc wrongly optimizes NULL check in strdup.

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Thu, 01 May 2014 20:03:15 -0000

#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 bonefish):

 I think that having our `strdup()` implementation check the argument for
 NULL is just fine. However, we should still fix our code (and third party
 open source code) not to rely on that.

--
Ticket URL: <https://dev.haiku-os.org/ticket/10803#comment:8>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: