[haiku-bugs] Re: [Haiku] #9140: KDL when configure bison-2.6.4

  • From: "siarzhuk" <trac@xxxxxxxxxxxx>
  • Date: Tue, 10 Sep 2013 15:35:19 -0000

#9140: KDL when configure bison-2.6.4
-----------------------------+-----------------------
   Reporter:  diger          |      Owner:  axeld
       Type:  bug            |     Status:  new
   Priority:  critical       |  Milestone:  R1
  Component:  System/Kernel  |    Version:  R1/alpha4
 Resolution:                 |   Keywords:
 Blocked By:                 |   Blocking:
Has a Patch:  0              |   Platform:  All
-----------------------------+-----------------------

Comment (by siarzhuk):

 Hm... Just quick look: The create_vnode's parameter openMode is 524801
 that correspond to O_CREAT | O_WRONLY | O_NOFOLLOW (0x80201). So the
 traverse variable in the code below should be set to false.

 The only call of VNodePutter::Put is "protected" by if (... && traverse)
 so it should not be issued in case traverse is false. But it did.

 Was the O_NOFOLLOW defined into the value different that 0x00080000 during
 compiling vfs.cpp? Or I have missed something? ;-)

 {{{
 static int
 create_vnode(struct vnode* directory, const char* name, int openMode,
         int perms, bool kernel)
 {
         bool traverse = ((openMode & (O_NOTRAVERSE | O_NOFOLLOW)) == 0);

 [...]
                         // If the node is a symlink, we have to follow it,
 unless
                         // O_NOTRAVERSE is set.
                         if (S_ISLNK(vnode->Type()) && traverse) {
                                 putter.Put();
 }}}

--
Ticket URL: <http://dev.haiku-os.org/ticket/9140#comment:20>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: