Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Nov 2010 09:29:00 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/libexec/rtld-elf rtld.c
Message-ID:  <201011042110.oA4LAd3m021618@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2010-11-04 09:29:00 UTC

  FreeBSD src repository

  Modified files:
    libexec/rtld-elf     rtld.c 
  Log:
  SVN rev 214777 on 2010-11-04 09:29:00Z by kib
  
  In r214728, if dlopen() is called for the object that has been already
  loaded as a dependency and marked -z nodlopen, object' DAG is already
  initialized by load_needed_objects(). Due to this, the init_dag() call
  from dlopen() does not increment refcount for the object [1].
  
  Change init_dag() to not increment DAG refcount. Require explicit calls
  to ref_dag() to increment, and assert that ref_dag() and unref_dag()
  are called for root that has dag initialized. To fix the noted issue,
  unconditionally call both init_dag() and ref_dag() in dlopen() for the
  case when the object was already loaded, making it similar to the case
  of newly loaded object.
  
  Noted by:       jh [1]
  Reviewed by:    jh, kan
  MFC after:      6 days
  
  Revision  Changes    Path
  1.160     +5 -5      src/libexec/rtld-elf/rtld.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011042110.oA4LAd3m021618>