Project

General

Profile

Bug #10821

mkmf.rb: Incorrect have_devel? test depending on run order

Added by joshpeek (Joshua Peek) almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
[ruby-core:67962]

Description

have_devel? is usually lazily checked on the first call to try_do(). However, try_do() may be invoked within the scope of a with_ldflags or with_cflags block. If have_devel? is checked for the first time with altered test LDFLAGS or CFLAGS it may crash.

# extconf.rb
$LDFLAGS = "-L/custom/path/to/lib
try_ldflags "-Issl"
# try_ldflags -> try_link -> try_do -> have_devel (with incorrect $LDFLAG in scope)

Related issues

Related to Ruby master - Bug #11434: test_try_ldflag_invalid_opt fails when ruby is not installedRejectedActions

Associated revisions

Revision af5b7053
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: avoid interference

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of interference by modifying global variables in have_devel? method. [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49482
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: avoid interference

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of interference by modifying global variables in have_devel? method. [ruby-core:67962] [Bug #10821]

Revision 49482
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: avoid interference

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of interference by modifying global variables in have_devel? method. [ruby-core:67962] [Bug #10821]

Revision 49482
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: avoid interference

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of interference by modifying global variables in have_devel? method. [ruby-core:67962] [Bug #10821]

Revision 49482
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: avoid interference

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of interference by modifying global variables in have_devel? method. [ruby-core:67962] [Bug #10821]

Revision 49482
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: avoid interference

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of interference by modifying global variables in have_devel? method. [ruby-core:67962] [Bug #10821]

Revision a91de831
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: err by non existent file

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): err by non existent source file. [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49487
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: err by non existent file

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): err by non existent source file. [ruby-core:67962] [Bug #10821]

Revision 49487
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: err by non existent file

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): err by non existent source file. [ruby-core:67962] [Bug #10821]

Revision 49487
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: err by non existent file

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): err by non existent source file. [ruby-core:67962] [Bug #10821]

Revision 49487
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: err by non existent file

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): err by non existent source file. [ruby-core:67962] [Bug #10821]

Revision 49487
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

mkmf.rb: err by non existent file

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): err by non existent source file. [ruby-core:67962] [Bug #10821]

Revision 19424d0b
Added by naruse (Yui NARUSE) almost 5 years ago

merge revision(s) 49482,49487: [Backport #10821]

    * lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
      interference by modifying global variables in have_devel? method.
      [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49581
Added by naruse (Yui NARUSE) almost 5 years ago

merge revision(s) 49482,49487: [Backport #10821]

* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
  interference by modifying global variables in have_devel? method.
  [ruby-core:67962] [Bug #10821]

Revision 5b37cb25
Added by usa (Usaku NAKAMURA) over 4 years ago

merge revision(s) 49482,49487: [Backport #10821]

    * lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
      interference by modifying global variables in have_devel? method.
      [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49735
Added by usa (Usaku NAKAMURA) over 4 years ago

merge revision(s) 49482,49487: [Backport #10821]

* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
  interference by modifying global variables in have_devel? method.
  [ruby-core:67962] [Bug #10821]

Revision 8aca3e79
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) r49482,r49487: [Backport #10821]

    * lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
      interference by modifying global variables in have_devel? method.
      [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 49993
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) r49482,r49487: [Backport #10821]

* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
  interference by modifying global variables in have_devel? method.
  [ruby-core:67962] [Bug #10821]

History

#1

Updated by nobu (Nobuyoshi Nakada) almost 5 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r49482.


mkmf.rb: avoid interference

  • lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of interference by modifying global variables in have_devel? method. [ruby-core:67962] [Bug #10821]

Updated by tmm1 (Aman Gupta) almost 5 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: REQUIRED

Updated by naruse (Yui NARUSE) almost 5 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONE

ruby_2_2 r49581 merged revision(s) 49482,49487.

Updated by usa (Usaku NAKAMURA) almost 5 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONE to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE

Updated by usa (Usaku NAKAMURA) over 4 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE

ruby_2_0_0 r49735 merged revision(s) 49482,49487.
note: need to require envutil because it's not loaded implicitly ruby 2.0.0.

#6

Updated by nagachika (Tomoyuki Chikanaga) over 4 years ago

  • Backport changed from 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: DONE, 2.2: DONE

Backported into ruby_2_1 branch at r49993.

#7

Updated by vo.x (Vit Ondruch) over 4 years ago

  • Related to Bug #11434: test_try_ldflag_invalid_opt fails when ruby is not installed added

Also available in: Atom PDF