[ruby-cvs:68755] normal:r61574 (trunk): variable.c: fix autoload stack space regression

normal at ruby-lang.org normal at ruby-lang.org
Wed Jan 3 06:52:00 JST 2018


normal	2018-01-03 06:51:59 +0900 (Wed, 03 Jan 2018)

  New Revision: 61574

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61574

  Log:
    variable.c: fix autoload stack space regression
    
    r61560 ("offsetof(type, foo.bar) is (arguably) a GCCism")
    introduced 16 bytes of stack overhead on 64-bit systems.
    Remove that overhead and cast, instead.  While we're at it,
    restore the "waitq" name to clarify the purpose of the field.
    
    (This is one unfortunate consequence of the CC0 ccan/list.h
     implementation compared to the *GPL ones in glibc/urcu/linux)
    
    * variable.c (struct autoload_state): remove head field, clarify naming
      (autoload_reset): cast and adjust
      (autoload_sleep_done): ditto
      (rb_autoload_load): ditto

  Modified files:
    trunk/variable.c


More information about the ruby-cvs mailing list