Actions
Bug #10821
closedmkmf.rb: Incorrect have_devel? test depending on run order
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
Backport:
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)
Updated by nobu (Nobuyoshi Nakada) over 9 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 Karmani) over 9 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) over 9 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) over 9 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 9 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.
Updated by nagachika (Tomoyuki Chikanaga) over 9 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.
Updated by vo.x (Vit Ondruch) almost 9 years ago
- Related to Bug #11434: test_try_ldflag_invalid_opt fails when ruby is not installed added
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0