Skip to content

Commit aae2243

Browse files
authored
Backports for 1.11.4 (#57183)
2 parents d63aded + 6b74f47 commit aae2243

28 files changed

+503
-261
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,18 +2326,21 @@ end
23262326

23272327
function abstract_eval_cfunction(interp::AbstractInterpreter, e::Expr, vtypes::Union{VarTable,Nothing}, sv::AbsIntState)
23282328
f = abstract_eval_value(interp, e.args[2], vtypes, sv)
2329-
# rt = sp_type_rewrap(e.args[3], sv.linfo, true)
2329+
# rt = sp_type_rewrap(e.args[3], sv.linfo, true) # verify that the result type make sense?
2330+
# rt === Bottom && return RTEffects(Union{}, Any, EFFECTS_UNKNOWN)
23302331
atv = e.args[4]::SimpleVector
23312332
at = Vector{Any}(undef, length(atv) + 1)
23322333
at[1] = f
23332334
for i = 1:length(atv)
2334-
at[i + 1] = sp_type_rewrap(at[i], frame_instance(sv), false)
2335-
at[i + 1] === Bottom && return
2335+
atᵢ = at[i + 1] = sp_type_rewrap(atv[i], frame_instance(sv), false)
2336+
atᵢ === Bottom && return RTEffects(Union{}, Any, EFFECTS_UNKNOWN)
23362337
end
23372338
# this may be the wrong world for the call,
23382339
# but some of the result is likely to be valid anyways
23392340
# and that may help generate better codegen
23402341
abstract_call(interp, ArgInfo(nothing, at), StmtInfo(false), sv)
2342+
rt = e.args[1]
2343+
isconcretetype(rt) || (rt = Any)
23412344
nothing
23422345
end
23432346

@@ -3094,14 +3097,23 @@ function update_bestguess!(interp::AbstractInterpreter, frame::InferenceState,
30943097
slottypes = frame.slottypes
30953098
rt = widenreturn(rt, BestguessInfo(interp, bestguess, nargs, slottypes, currstate))
30963099
# narrow representation of bestguess slightly to prepare for tmerge with rt
3097-
if rt isa InterConditional && bestguess isa Const
3100+
if rt isa InterConditional && bestguess isa Const && bestguess.val isa Bool
30983101
slot_id = rt.slot
30993102
old_id_type = slottypes[slot_id]
31003103
if bestguess.val === true && rt.elsetype !== Bottom
31013104
bestguess = InterConditional(slot_id, old_id_type, Bottom)
31023105
elseif bestguess.val === false && rt.thentype !== Bottom
31033106
bestguess = InterConditional(slot_id, Bottom, old_id_type)
31043107
end
3108+
# or narrow representation of rt slightly to prepare for tmerge with bestguess
3109+
elseif bestguess isa InterConditional && rt isa Const && rt.val isa Bool
3110+
slot_id = bestguess.slot
3111+
old_id_type = widenconditional(slottypes[slot_id])
3112+
if rt.val === true && bestguess.elsetype !== Bottom
3113+
rt = InterConditional(slot_id, old_id_type, Bottom)
3114+
elseif rt.val === false && bestguess.thentype !== Bottom
3115+
rt = InterConditional(slot_id, Bottom, old_id_type)
3116+
end
31053117
end
31063118
# copy limitations to return value
31073119
if !isempty(frame.pclimitations)

base/compiler/typelattice.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,13 @@ end
427427
end
428428
a = Bool
429429
elseif isa(b, ConditionalT)
430+
if isa(a, Const) && isa(a.val, Bool)
431+
if (a.val === true && b.thentype === Any && b.elsetype === Bottom) ||
432+
(a.val === false && b.elsetype === Any && b.thentype === Bottom)
433+
# this Conditional contains distinctly no lattice information, and is simply an alternative representation of the Const Bool used for internal tracking purposes
434+
return true
435+
end
436+
end
430437
return false
431438
end
432439
return (widenlattice(lattice), a, b)

base/compiler/typelimits.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ end
575575
@nospecializeinfer function tmerge_partial_struct(lattice::PartialsLattice, @nospecialize(typea), @nospecialize(typeb))
576576
aty = widenconst(typea)
577577
bty = widenconst(typeb)
578-
if aty === bty
578+
if aty === bty && !isType(aty)
579579
# must have egal here, since we do not create PartialStruct for non-concrete types
580580
typea_nfields = nfields_tfunc(lattice, typea)
581581
typeb_nfields = nfields_tfunc(lattice, typeb)
@@ -589,9 +589,6 @@ end
589589
for i = 1:type_nfields
590590
ai = getfield_tfunc(lattice, typea, Const(i))
591591
bi = getfield_tfunc(lattice, typeb, Const(i))
592-
# N.B.: We're assuming here that !isType(aty), because that case
593-
# only arises when typea === typeb, which should have been caught
594-
# before calling this.
595592
ft = fieldtype(aty, i)
596593
if is_lattice_equal(lattice, ai, bi) || is_lattice_equal(lattice, ai, ft)
597594
# Since ai===bi, the given type has no restrictions on complexity.

base/compiler/typeutils.jl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,8 @@ function isTypeDataType(@nospecialize t)
3636
isType(t) && return false
3737
# Could be Union{} at runtime
3838
t === Core.TypeofBottom && return false
39-
if t.name === Tuple.name
40-
# If we have a Union parameter, could have been redistributed at runtime,
41-
# e.g. `Tuple{Union{Int, Float64}, Int}` is a DataType, but
42-
# `Union{Tuple{Int, Int}, Tuple{Float64, Int}}` is typeequal to it and
43-
# is not.
44-
return all(isTypeDataType, t.parameters)
45-
end
46-
return true
39+
# Return true if `t` is not covariant
40+
return t.name !== Tuple.name
4741
end
4842

4943
has_extended_info(@nospecialize x) = (!isa(x, Type) && !isvarargtype(x)) || isType(x)

base/expr.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,14 @@ macro constprop(setting)
400400
end
401401

402402
function constprop_setting(@nospecialize setting)
403+
s = setting
403404
isa(setting, QuoteNode) && (setting = setting.value)
404405
if setting === :aggressive
405406
return :aggressive_constprop
406407
elseif setting === :none
407408
return :no_constprop
408409
end
409-
throw(ArgumentError(LazyString("@constprop "), setting, "not supported"))
410+
throw(ArgumentError(LazyString("`Base.@constprop ", s, "` not supported")))
410411
end
411412

412413
"""

base/io.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,11 +864,10 @@ end
864864

865865
function write(io::IO, c::Char)
866866
u = bswap(reinterpret(UInt32, c))
867-
n = 1
867+
n = 0
868868
while true
869-
write(io, u % UInt8)
869+
n += write(io, u % UInt8)
870870
(u >>= 8) == 0 && return n
871-
n += 1
872871
end
873872
end
874873
# write(io, ::AbstractChar) is not defined: implementations

deps/checksums/openlibm

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
OpenLibm.v0.8.1+2.aarch64-apple-darwin.tar.gz/md5/9ce53048e8944f6edff44f75b731229c
2-
OpenLibm.v0.8.1+2.aarch64-apple-darwin.tar.gz/sha512/3a14e28db0656b47a473e19ca0afae1f8b72dd01e108d6b6cb52dc24fc03e4a43db867616b375369e82177bb274fbcfeb8f24b488ee68871e8da8463e9090adf
3-
OpenLibm.v0.8.1+2.aarch64-linux-gnu.tar.gz/md5/8b284fe2905c3e5315291f5e5f27ca8b
4-
OpenLibm.v0.8.1+2.aarch64-linux-gnu.tar.gz/sha512/d326181349ee7f74b73611cd71f933e93c38c11d6db9a1cd4fee49d1ac06c7f244f4cfc6ab373dd52909064117405b3d4fa39e5c626464c066ab53f1cd26dc4a
5-
OpenLibm.v0.8.1+2.aarch64-linux-musl.tar.gz/md5/dc40ad1f2e53a3b914dcca364b6ead77
6-
OpenLibm.v0.8.1+2.aarch64-linux-musl.tar.gz/sha512/3779d8cd23c5987a15666e2160e40f5a6fc5e7d350c9e3c86d8af8c99515a8cb1f3b5e8438dae0f3cf0b5e1cb2c0cb74c5dd5a06c65e0c2a2382d86dacfaf9fb
7-
OpenLibm.v0.8.1+2.armv6l-linux-gnueabihf.tar.gz/md5/7c9e56f6124b85e7dee74601f8c16abd
8-
OpenLibm.v0.8.1+2.armv6l-linux-gnueabihf.tar.gz/sha512/a78e15177992025462d334a9d5b10b9c7f6710d77ac36056fe7a1cc3bc3fada87f16696366578cfa5f325d5f746639c41c5d80b4885814014d29556d63bd4c7c
9-
OpenLibm.v0.8.1+2.armv6l-linux-musleabihf.tar.gz/md5/78d9e3178fdf93a35f7d2b0b00753dc6
10-
OpenLibm.v0.8.1+2.armv6l-linux-musleabihf.tar.gz/sha512/ff7b78786f7035eaa08770ddf7d4eb2984595a318c3ac4dfbe4091ca398e00638df2e77bc2ab5fd159defd0927d4fe46b7e824cf055fbae4860bfa12347e8c5b
11-
OpenLibm.v0.8.1+2.armv7l-linux-gnueabihf.tar.gz/md5/7c9e56f6124b85e7dee74601f8c16abd
12-
OpenLibm.v0.8.1+2.armv7l-linux-gnueabihf.tar.gz/sha512/a78e15177992025462d334a9d5b10b9c7f6710d77ac36056fe7a1cc3bc3fada87f16696366578cfa5f325d5f746639c41c5d80b4885814014d29556d63bd4c7c
13-
OpenLibm.v0.8.1+2.armv7l-linux-musleabihf.tar.gz/md5/78d9e3178fdf93a35f7d2b0b00753dc6
14-
OpenLibm.v0.8.1+2.armv7l-linux-musleabihf.tar.gz/sha512/ff7b78786f7035eaa08770ddf7d4eb2984595a318c3ac4dfbe4091ca398e00638df2e77bc2ab5fd159defd0927d4fe46b7e824cf055fbae4860bfa12347e8c5b
15-
OpenLibm.v0.8.1+2.i686-linux-gnu.tar.gz/md5/e9942dca99f024ae27876ea5ab1592a9
16-
OpenLibm.v0.8.1+2.i686-linux-gnu.tar.gz/sha512/406e39894a643bf99c493585fa631800bbbcd6c36aaa9e677de772f7ceaed93b462fdf797235174e22baf2f34c26527f400e282061954b34f05b389acaba1e29
17-
OpenLibm.v0.8.1+2.i686-linux-musl.tar.gz/md5/0037f2e2113282d49967eba72f215c4b
18-
OpenLibm.v0.8.1+2.i686-linux-musl.tar.gz/sha512/96666332a814232084340791384505acf964064dba4f7b62db51a7ae4416237decb40318dc07b9a041547fd4ff77f204f42bc5c7f029e590af1ee1dd6196d843
19-
OpenLibm.v0.8.1+2.i686-w64-mingw32.tar.gz/md5/73193f2e5149d07008902adfbf1b74b2
20-
OpenLibm.v0.8.1+2.i686-w64-mingw32.tar.gz/sha512/e8202b59b8f922bcc908b8b8e6687a674faa701689f5c6175d83fea0bcc5d73f74bed37660e60406f37873dab1d8489e0fd1506294791adfa61a069555eababf
21-
OpenLibm.v0.8.1+2.powerpc64le-linux-gnu.tar.gz/md5/01997fb48464f94f59f4708bd26eabc3
22-
OpenLibm.v0.8.1+2.powerpc64le-linux-gnu.tar.gz/sha512/1e1d8901fd3aab0948be5c387b8d5bd0db12766fe00bf800ee3100aa0d5973c7aa03ef9c9b4e34942e5e2b46b64035d7f8d7b070113db031d4611f2a7dd02ca3
23-
OpenLibm.v0.8.1+2.x86_64-apple-darwin.tar.gz/md5/6cb5a472d6c1446acfca11bb8f7283d6
24-
OpenLibm.v0.8.1+2.x86_64-apple-darwin.tar.gz/sha512/e52f399002544d94536c3bda742d3cc5b0995929d656eeb0e808954fb800fd8e5cfc0ab57279fbccab44fc33a1207ab345d78e685d519ff7f02cca8f554b9c06
25-
OpenLibm.v0.8.1+2.x86_64-linux-gnu.tar.gz/md5/e1c7dc61e98d5b8aa68de3462a2620a4
26-
OpenLibm.v0.8.1+2.x86_64-linux-gnu.tar.gz/sha512/fe6d74a2522d75374b87ac9746d444d75a768e069f24f3fbfc6a140aa9d073fa54e8899861f839e647b9261e660c5f2b5555f52fab39ef84a74685b632e89df9
27-
OpenLibm.v0.8.1+2.x86_64-linux-musl.tar.gz/md5/5fe8eb59d21732a80f432720419324b3
28-
OpenLibm.v0.8.1+2.x86_64-linux-musl.tar.gz/sha512/0d1b22ca01eda89caa1832b63b1d7ddafe0fedf5906680e817100e2176cbbae95f576409706a9ea1834bc692b72009f4fd244586df30228d18e626bf25fc040a
29-
OpenLibm.v0.8.1+2.x86_64-unknown-freebsd.tar.gz/md5/2bcdf32fdef91433763e32be029814d9
30-
OpenLibm.v0.8.1+2.x86_64-unknown-freebsd.tar.gz/sha512/97854736fc8c797abd5a5c331e5795dfa9124ac108a76fc2bcac518f5750a08884717d611bb98222b13387bcd27e1c3f4ec841547859e87fafbbe8c7dcd7381a
31-
OpenLibm.v0.8.1+2.x86_64-w64-mingw32.tar.gz/md5/e22079c6e610c9543cca0fb88495d989
32-
OpenLibm.v0.8.1+2.x86_64-w64-mingw32.tar.gz/sha512/67081bcf360a62eee3928bd1b9d5302ed29b4a176245721723692d5ef938a828379617847308f26a2c7bc0cb2d0dce129d4b8c65c0446c611126894c0aaa5ea8
1+
OpenLibm.v0.8.1+4.aarch64-apple-darwin.tar.gz/md5/f7f8947d276e50b58db7530e050062fd
2+
OpenLibm.v0.8.1+4.aarch64-apple-darwin.tar.gz/sha512/9e28c02d1aa98fdff8e637c9d1a577325d76c098bc89837b5bd3a50ec05647ab8379893a7945d570907b82ef9446804a0065403b6ddec8ede4cb9b0acf5b27ea
3+
OpenLibm.v0.8.1+4.aarch64-linux-gnu.tar.gz/md5/bf9e4bc08aa8488319724b9a3011be8b
4+
OpenLibm.v0.8.1+4.aarch64-linux-gnu.tar.gz/sha512/773263ff709fbdbd07cde5049372175f7cf8fefa26a5fae0fdc48990886911e8c9bcfdb8b05158f38621c79a17e445ad73d41cc4186f6d9df84a3e8232a8a17d
5+
OpenLibm.v0.8.1+4.aarch64-linux-musl.tar.gz/md5/eab078c285039562f65f8fc1d8d62fd9
6+
OpenLibm.v0.8.1+4.aarch64-linux-musl.tar.gz/sha512/c0b818d728f85ef1ed4231dc2a3bc78e95de9186829d12012b168505b6d6505e4732a379c67a5a3c37e40e048bbaadabc00d153383347e9f606fc9731ebb26d5
7+
OpenLibm.v0.8.1+4.armv6l-linux-gnueabihf.tar.gz/md5/c76f4ca7bbcd276e5769bd73bee00966
8+
OpenLibm.v0.8.1+4.armv6l-linux-gnueabihf.tar.gz/sha512/0a711684d1289c747ecadeee0fa1c8ca6067727a5ab5d531f7c30f998c8ee04803c6712067426c939f50698c15104724214eaa3953e522a6dc210c39954f2727
9+
OpenLibm.v0.8.1+4.armv6l-linux-musleabihf.tar.gz/md5/e072d09a671f98bede25cb0bd00a2fd4
10+
OpenLibm.v0.8.1+4.armv6l-linux-musleabihf.tar.gz/sha512/37a741e5f66ca4dc8c9358376afb562c7d2a1bb1fcbde2c9b555001a4e6faffc0446b5faff33aead192d4b2fc8cd45c8261b06cc40abec73e39dc63da932b8ab
11+
OpenLibm.v0.8.1+4.armv7l-linux-gnueabihf.tar.gz/md5/c76f4ca7bbcd276e5769bd73bee00966
12+
OpenLibm.v0.8.1+4.armv7l-linux-gnueabihf.tar.gz/sha512/0a711684d1289c747ecadeee0fa1c8ca6067727a5ab5d531f7c30f998c8ee04803c6712067426c939f50698c15104724214eaa3953e522a6dc210c39954f2727
13+
OpenLibm.v0.8.1+4.armv7l-linux-musleabihf.tar.gz/md5/e072d09a671f98bede25cb0bd00a2fd4
14+
OpenLibm.v0.8.1+4.armv7l-linux-musleabihf.tar.gz/sha512/37a741e5f66ca4dc8c9358376afb562c7d2a1bb1fcbde2c9b555001a4e6faffc0446b5faff33aead192d4b2fc8cd45c8261b06cc40abec73e39dc63da932b8ab
15+
OpenLibm.v0.8.1+4.i686-linux-gnu.tar.gz/md5/d8602652f0f347a16e39a869eb2ccb83
16+
OpenLibm.v0.8.1+4.i686-linux-gnu.tar.gz/sha512/b140032c96497c7e6626751b799598bd54f687af3976bc43ac7ddb6f490527dca64fd44a125da2f54d8ca3679ad53d2700d412ec4c2ddcfe7bfbfe719c0cfc05
17+
OpenLibm.v0.8.1+4.i686-linux-musl.tar.gz/md5/5d20637487e85b529e3901d129b586a7
18+
OpenLibm.v0.8.1+4.i686-linux-musl.tar.gz/sha512/b83742801cdfee62bf14bf66f4d20e42219899d431ab335c23f2943c00363c82ee2ab1b853ec421eb825dbe65899fc8f3a3c91c3d86c5e4891c60ddc981d0831
19+
OpenLibm.v0.8.1+4.i686-w64-mingw32.tar.gz/md5/6ba08a1d5b3aa21fa58618f9ea2a9b8d
20+
OpenLibm.v0.8.1+4.i686-w64-mingw32.tar.gz/sha512/63bed0bc519fa87abae157b53f439f8b452720090780f306b62ff802b8f8ddc4b546899aad5b3e91dacdc3439b7a10a36080d34f09f072719f766c3cdb0baa82
21+
OpenLibm.v0.8.1+4.powerpc64le-linux-gnu.tar.gz/md5/c9c690ff59b202763ee901f22a798d69
22+
OpenLibm.v0.8.1+4.powerpc64le-linux-gnu.tar.gz/sha512/83a1e37a62dcff357836385f55f9410cf49b10445c8320b62381359557306c97f11773c508e816fb0bbd4de372b6666833e960921959b6dbb4c7c954e230004a
23+
OpenLibm.v0.8.1+4.x86_64-apple-darwin.tar.gz/md5/bbe8f7a039ad3f07baca340112ea2e65
24+
OpenLibm.v0.8.1+4.x86_64-apple-darwin.tar.gz/sha512/89e578b7e8e56e7152c9f5881fbf51b33833f8e2143126212e60db262de5641573f33dea5b810575a39e21ec4fbaaa307a049d42e06970c7d4e052b97622938a
25+
OpenLibm.v0.8.1+4.x86_64-linux-gnu.tar.gz/md5/94f42c769349c92987ed3bd9f35d96e0
26+
OpenLibm.v0.8.1+4.x86_64-linux-gnu.tar.gz/sha512/5e901618da26aa6f0f7d05ed1e5c538aea88cadb59b0efc7213203f1714e85aa0b6f0d463f2a4d367d2a8af36e37e7c353fdefbb98599fdc5bc182a6b93e4348
27+
OpenLibm.v0.8.1+4.x86_64-linux-musl.tar.gz/md5/462b9dfebd341f0c8bb33ba72f99f769
28+
OpenLibm.v0.8.1+4.x86_64-linux-musl.tar.gz/sha512/df84815a282a065e8fa33aa35ee29166a1119cd776f8812073e55521ca8c94f4bca679206b8a67ef69edbbb6ba6fca520d81626f687ca353a63146c4858ced80
29+
OpenLibm.v0.8.1+4.x86_64-unknown-freebsd.tar.gz/md5/f3642b29670e6216056a13f5da9e87b8
30+
OpenLibm.v0.8.1+4.x86_64-unknown-freebsd.tar.gz/sha512/613242d2f24b1dcc4b2bfd6f22ad66e9889f618ee685b50d9fdf33b9f3798fe503fc9e278f291118db70bacd54bd475f12554a4a56c60c369222fd23b3c5ba22
31+
OpenLibm.v0.8.1+4.x86_64-w64-mingw32.tar.gz/md5/59381a874c86a5ad5f3fb3b206587f64
32+
OpenLibm.v0.8.1+4.x86_64-w64-mingw32.tar.gz/sha512/3a8dd3ef46f15f78a34bdc37c5e26dcbf8522625457aa7c52dca21cbb967c5e39257216e5fc203ff57c9171b6c0f2e2ee9d6216c43b0254008f0e91318bb5f0e
3333
openlibm-ae2d91698508701c83cab83714d42a1146dccf85.tar.gz/md5/19408d70bf042a109e1c267a53740089
3434
openlibm-ae2d91698508701c83cab83714d42a1146dccf85.tar.gz/sha512/9597fdcbc4af8369e6eecc3f8e86f251661cc64d236578f3ee8a6b39e77a47951446e1a0fe1151513da153e7ed17bf39aa5a36c32153d0d0400232bed2839e22

deps/openlibm.mk

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ $(eval $(call git-external,openlibm,OPENLIBM,,,$(BUILDDIR)))
66

77
OPENLIBM_FLAGS := ARCH="$(ARCH)" REAL_ARCH="$(MARCH)" CC="$(CC)" FC="$(FC)" AR="$(AR)" OS="$(OS)" USECLANG=$(USECLANG) USEGCC=$(USEGCC)
88

9-
$(BUILDDIR)/$(OPENLIBM_SRC_DIR)/build-compiled: $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/source-extracted
9+
10+
$(BUILDDIR)/$(OPENLIBM_SRC_DIR)/source-extracted/openlibm-stack-markings.patch-applied: $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/source-extracted
11+
mkdir -p $(dir $@)
12+
cd $(SRCCACHE)/openlibm-$(OPENLIBM_VER) && \
13+
patch -p1 -f < $(SRCDIR)/patches/openlibm-stack-markings.patch
14+
echo 1 > $@
15+
16+
$(BUILDDIR)/$(OPENLIBM_SRC_DIR)/build-compiled: $(BUILDDIR)/$(OPENLIBM_SRC_DIR)/source-extracted/openlibm-stack-markings.patch-applied
1017
$(MAKE) -C $(dir $<) $(OPENLIBM_FLAGS) $(MAKE_COMMON)
1118
echo 1 > $@
1219

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
From e2482c959e584d52c032af63d1073d2a4e57c345 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Jakov=20Smoli=C4=87?= <[email protected]>
3+
Date: Mon, 5 Aug 2024 00:12:41 +0200
4+
Subject: [PATCH] Add stack markings for GNU to fmod assembly files (#307)
5+
6+
This adds stack markings to the missing fmod .S files, otherwise the
7+
final libopenlibm object file gets marked with an executable stack.
8+
9+
Output when compiling from source on Gentoo Linux:
10+
11+
```
12+
* QA Notice: The following files contain writable and executable sections
13+
* Files with such sections will not work properly (or at all!) on some
14+
* architectures/operating systems. A bug should be filed at
15+
* https://bugs.gentoo.org/ to make sure the issue is fixed.
16+
* For more information, see:
17+
*
18+
* https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
19+
*
20+
* Please include the following list of files in your report:
21+
* Note: Bugs should be filed for the respective maintainers
22+
* of the package in question and not [email protected].
23+
* RWX --- --- usr/lib64/libopenlibm.so.4.0
24+
```
25+
---
26+
amd64/e_fmod.S | 5 +++++
27+
amd64/e_fmodf.S | 5 +++++
28+
amd64/e_fmodl.S | 5 +++++
29+
3 files changed, 15 insertions(+)
30+
31+
diff --git a/amd64/e_fmod.S b/amd64/e_fmod.S
32+
index 37cae391..d2c8ecd9 100644
33+
--- a/amd64/e_fmod.S
34+
+++ b/amd64/e_fmod.S
35+
@@ -49,3 +49,8 @@ ENTRY(fmod)
36+
fstp %st
37+
ret
38+
END(fmod)
39+
+
40+
+/* Enable stack protection */
41+
+#if defined(__ELF__)
42+
+.section .note.GNU-stack,"",%progbits
43+
+#endif
44+
diff --git a/amd64/e_fmodf.S b/amd64/e_fmodf.S
45+
index 197892e8..b045e735 100644
46+
--- a/amd64/e_fmodf.S
47+
+++ b/amd64/e_fmodf.S
48+
@@ -19,3 +19,8 @@ ENTRY(fmodf)
49+
fstp %st
50+
ret
51+
END(fmodf)
52+
+
53+
+/* Enable stack protection */
54+
+#if defined(__ELF__)
55+
+.section .note.GNU-stack,"",%progbits
56+
+#endif
57+
diff --git a/amd64/e_fmodl.S b/amd64/e_fmodl.S
58+
index 64be92f1..cab539d5 100644
59+
--- a/amd64/e_fmodl.S
60+
+++ b/amd64/e_fmodl.S
61+
@@ -45,3 +45,8 @@ ENTRY(fmodl)
62+
fstp %st(1)
63+
ret
64+
END(fmodl)
65+
+
66+
+/* Enable stack protection */
67+
+#if defined(__ELF__)
68+
+.section .note.GNU-stack,"",%progbits
69+
+#endif

doc/src/manual/code-loading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Each kind of environment defines these three maps differently, as detailed in th
6363

6464
### Project environments
6565

66-
A project environment is determined by a directory containing a project file called `Project.toml`, and optionally a manifest file called `Manifest.toml`. These files may also be called `JuliaProject.toml` and `JuliaManifest.toml`, in which case `Project.toml` and `Manifest.toml` are ignored. This allows for coexistence with other tools that might consider files called `Project.toml` and `Manifest.toml` significant. For pure Julia projects, however, the names `Project.toml` and `Manifest.toml` are preferred. However, from Julia v1.11 onwards, `(Julia)Manifest-v{major}.{minor}.toml` is recognized as a format to make a given julia version use a specific manifest file i.e. in the same folder, a `Manifest-v1.11.toml` would be used by v1.11 and `Manifest.toml` by any other julia version.
66+
A project environment is determined by a directory containing a project file called `Project.toml`, and optionally a manifest file called `Manifest.toml`. These files may also be called `JuliaProject.toml` and `JuliaManifest.toml`, in which case `Project.toml` and `Manifest.toml` are ignored. This allows for coexistence with other tools that might consider files called `Project.toml` and `Manifest.toml` significant. For pure Julia projects, however, the names `Project.toml` and `Manifest.toml` are preferred. However, from Julia v1.10.8 onwards, `(Julia)Manifest-v{major}.{minor}.toml` is recognized as a format to make a given julia version use a specific manifest file i.e. in the same folder, a `Manifest-v1.11.toml` would be used by v1.11 and `Manifest.toml` by any other julia version.
6767

6868
The roots, graph and paths maps of a project environment are defined as follows:
6969

0 commit comments

Comments
 (0)