mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Compare commits
41 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
339c903a75 | ||
|
334de7982f | ||
|
5d6920842b | ||
|
949eae84df | ||
|
0bfde51e0d | ||
|
45a52718e3 | ||
|
7f375e2c22 | ||
|
4070531920 | ||
|
5ffdb9c88b | ||
|
becc17ebcd | ||
|
d418e224ae | ||
|
456eaf5c29 | ||
|
e4ef83383e | ||
|
4e6d3468cc | ||
|
f5c388313f | ||
|
af236716b2 | ||
|
0f7b7600fb | ||
|
eb58df7dbf | ||
|
30f4d9e117 | ||
|
bb0e5c2045 | ||
|
cd0e528d3d | ||
|
80e2e474b8 | ||
|
3901409b5d | ||
|
35c0ea22a9 | ||
|
6d399e9da6 | ||
|
b7b4c60585 | ||
|
18068cb96a | ||
|
c43ac38b3b | ||
|
4241f582fc | ||
|
8a4c24f9bb | ||
|
3de5aca7d0 | ||
|
8336dfde70 | ||
|
6b60550504 | ||
|
468fad45a2 | ||
|
e06b6fc58d | ||
|
b3799ba634 | ||
|
16afa6a740 | ||
|
817d7bdc0a | ||
|
14bb1e11b9 | ||
|
2297c34cdf | ||
|
26682773ca |
@ -1 +1,2 @@
|
||||
branch: master
|
||||
branch: release-branch.go1.24
|
||||
parent-branch: master
|
||||
|
@ -153,6 +153,17 @@ and the [go command documentation](/cmd/go#hdr-Build_and_test_caching).
|
||||
|
||||
### Go 1.24
|
||||
|
||||
Go 1.24 added a new `fips140` setting that controls whether the Go
|
||||
Cryptographic Module operates in FIPS 140-3 mode.
|
||||
The possible values are:
|
||||
- "off": no special support for FIPS 140-3 mode. This is the default.
|
||||
- "on": the Go Cryptographic Module operates in FIPS 140-3 mode.
|
||||
- "only": like "on", but cryptographic algorithms not approved by
|
||||
FIPS 140-3 return an error or panic.
|
||||
For more information, see [FIPS 140-3 Compliance](/doc/security/fips140).
|
||||
This setting is fixed at program startup time, and can't be modified
|
||||
by changing the `GODEBUG` environment variable after the program starts.
|
||||
|
||||
Go 1.24 changed the global [`math/rand.Seed`](/pkg/math/rand/#Seed) to be a
|
||||
no-op. This behavior is controlled by the `randseednop` setting.
|
||||
For Go 1.24 it defaults to `randseednop=1`.
|
||||
|
@ -67,26 +67,26 @@ func splitSeq(s, sep []byte, sepSave int) iter.Seq[[]byte] {
|
||||
}
|
||||
}
|
||||
|
||||
// SplitSeq returns an iterator over all substrings of s separated by sep.
|
||||
// The iterator yields the same strings that would be returned by [Split](s, sep),
|
||||
// but without constructing the slice.
|
||||
// SplitSeq returns an iterator over all subslices of s separated by sep.
|
||||
// The iterator yields the same subslices that would be returned by [Split](s, sep),
|
||||
// but without constructing a new slice containing the subslices.
|
||||
// It returns a single-use iterator.
|
||||
func SplitSeq(s, sep []byte) iter.Seq[[]byte] {
|
||||
return splitSeq(s, sep, 0)
|
||||
}
|
||||
|
||||
// SplitAfterSeq returns an iterator over substrings of s split after each instance of sep.
|
||||
// The iterator yields the same strings that would be returned by [SplitAfter](s, sep),
|
||||
// but without constructing the slice.
|
||||
// SplitAfterSeq returns an iterator over subslices of s split after each instance of sep.
|
||||
// The iterator yields the same subslices that would be returned by [SplitAfter](s, sep),
|
||||
// but without constructing a new slice containing the subslices.
|
||||
// It returns a single-use iterator.
|
||||
func SplitAfterSeq(s, sep []byte) iter.Seq[[]byte] {
|
||||
return splitSeq(s, sep, len(sep))
|
||||
}
|
||||
|
||||
// FieldsSeq returns an iterator over substrings of s split around runs of
|
||||
// FieldsSeq returns an iterator over subslices of s split around runs of
|
||||
// whitespace characters, as defined by [unicode.IsSpace].
|
||||
// The iterator yields the same strings that would be returned by [Fields](s),
|
||||
// but without constructing the slice.
|
||||
// The iterator yields the same subslices that would be returned by [Fields](s),
|
||||
// but without constructing a new slice containing the subslices.
|
||||
func FieldsSeq(s []byte) iter.Seq[[]byte] {
|
||||
return func(yield func([]byte) bool) {
|
||||
start := -1
|
||||
@ -116,10 +116,10 @@ func FieldsSeq(s []byte) iter.Seq[[]byte] {
|
||||
}
|
||||
}
|
||||
|
||||
// FieldsFuncSeq returns an iterator over substrings of s split around runs of
|
||||
// FieldsFuncSeq returns an iterator over subslices of s split around runs of
|
||||
// Unicode code points satisfying f(c).
|
||||
// The iterator yields the same strings that would be returned by [FieldsFunc](s),
|
||||
// but without constructing the slice.
|
||||
// The iterator yields the same subslices that would be returned by [FieldsFunc](s),
|
||||
// but without constructing a new slice containing the subslices.
|
||||
func FieldsFuncSeq(s []byte, f func(rune) bool) iter.Seq[[]byte] {
|
||||
return func(yield func([]byte) bool) {
|
||||
start := -1
|
||||
|
@ -1009,6 +1009,38 @@ func canInlineCallExpr(callerfn *ir.Func, n *ir.CallExpr, callee *ir.Func, bigCa
|
||||
return false, 0, false
|
||||
}
|
||||
|
||||
isClosureParent := func(closure, parent *ir.Func) bool {
|
||||
for p := closure.ClosureParent; p != nil; p = p.ClosureParent {
|
||||
if p == parent {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
if isClosureParent(callerfn, callee) {
|
||||
// Can't recursively inline a parent of the closure into itself.
|
||||
if log && logopt.Enabled() {
|
||||
logopt.LogOpt(n.Pos(), "cannotInlineCall", "inline", fmt.Sprintf("recursive call to closure parent: %s, %s", ir.FuncName(callerfn), ir.FuncName(callee)))
|
||||
}
|
||||
return false, 0, false
|
||||
}
|
||||
if isClosureParent(callee, callerfn) {
|
||||
// Can't recursively inline a closure if there's a call to the parent in closure body.
|
||||
if ir.Any(callee, func(node ir.Node) bool {
|
||||
if call, ok := node.(*ir.CallExpr); ok {
|
||||
if name, ok := call.Fun.(*ir.Name); ok && isClosureParent(callerfn, name.Func) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}) {
|
||||
if log && logopt.Enabled() {
|
||||
logopt.LogOpt(n.Pos(), "cannotInlineCall", "inline", fmt.Sprintf("recursive call to closure parent: %s, %s", ir.FuncName(callerfn), ir.FuncName(callee)))
|
||||
}
|
||||
return false, 0, false
|
||||
}
|
||||
}
|
||||
|
||||
if base.Flag.Cfg.Instrumenting && types.IsNoInstrumentPkg(callee.Sym().Pkg) {
|
||||
// Runtime package must not be instrumented.
|
||||
// Instrument skips runtime package. However, some runtime code can be
|
||||
|
@ -1148,10 +1148,12 @@
|
||||
(SUB a l:(MNEGW x y)) && v.Type.Size() <= 4 && l.Uses==1 && clobber(l) => (MADDW a x y)
|
||||
|
||||
// madd/msub can't take constant arguments, so do a bit of reordering if a non-constant is available.
|
||||
(ADD a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (ADDconst [c] (ADD <v.Type> a m))
|
||||
(ADD a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (SUBconst [c] (ADD <v.Type> a m))
|
||||
(SUB a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (SUBconst [c] (SUB <v.Type> a m))
|
||||
(SUB a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 => (ADDconst [c] (SUB <v.Type> a m))
|
||||
// Note: don't reorder arithmetic concerning pointers, as we must ensure that
|
||||
// no intermediate computations are invalid pointers.
|
||||
(ADD <t> a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (ADDconst [c] (ADD <v.Type> a m))
|
||||
(ADD <t> a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (SUBconst [c] (ADD <v.Type> a m))
|
||||
(SUB <t> a p:(ADDconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (SUBconst [c] (SUB <v.Type> a m))
|
||||
(SUB <t> a p:(SUBconst [c] m:((MUL|MULW|MNEG|MNEGW) _ _))) && p.Uses==1 && m.Uses==1 && !t.IsPtrShaped() => (ADDconst [c] (SUB <v.Type> a m))
|
||||
|
||||
// optimize ADCSflags, SBCSflags and friends
|
||||
(ADCSflags x y (Select1 <types.TypeFlags> (ADDSconstflags [-1] (ADCzerocarry <typ.UInt64> c)))) => (ADCSflags x y c)
|
||||
|
@ -41,11 +41,12 @@ type Func struct {
|
||||
ABISelf *abi.ABIConfig // ABI for function being compiled
|
||||
ABIDefault *abi.ABIConfig // ABI for rtcall and other no-parsed-signature/pragma functions.
|
||||
|
||||
scheduled bool // Values in Blocks are in final order
|
||||
laidout bool // Blocks are ordered
|
||||
NoSplit bool // true if function is marked as nosplit. Used by schedule check pass.
|
||||
dumpFileSeq uint8 // the sequence numbers of dump file. (%s_%02d__%s.dump", funcname, dumpFileSeq, phaseName)
|
||||
IsPgoHot bool
|
||||
scheduled bool // Values in Blocks are in final order
|
||||
laidout bool // Blocks are ordered
|
||||
NoSplit bool // true if function is marked as nosplit. Used by schedule check pass.
|
||||
dumpFileSeq uint8 // the sequence numbers of dump file. (%s_%02d__%s.dump", funcname, dumpFileSeq, phaseName)
|
||||
IsPgoHot bool
|
||||
HasDeferRangeFunc bool // if true, needs a deferreturn so deferrangefunc can use it for recover() return PC
|
||||
|
||||
// when register allocation is done, maps value ids to locations
|
||||
RegAlloc []Location
|
||||
|
@ -552,8 +552,9 @@ func (ft *factsTable) newLimit(v *Value, newLim limit) bool {
|
||||
}
|
||||
|
||||
if lim.unsat() {
|
||||
r := !ft.unsat
|
||||
ft.unsat = true
|
||||
return true
|
||||
return r
|
||||
}
|
||||
|
||||
// Check for recursion. This normally happens because in unsatisfiable
|
||||
|
@ -1670,6 +1670,7 @@ func (s *regAllocState) regalloc(f *Func) {
|
||||
}
|
||||
tmpReg = s.allocReg(m, &tmpVal)
|
||||
s.nospill |= regMask(1) << tmpReg
|
||||
s.tmpused |= regMask(1) << tmpReg
|
||||
}
|
||||
|
||||
// Now that all args are in regs, we're ready to issue the value itself.
|
||||
|
@ -1331,10 +1331,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(ADDconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(ADDconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1343,7 +1344,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
@ -1355,10 +1356,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(ADDconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(ADDconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1367,7 +1369,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
@ -1379,10 +1381,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(ADDconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(ADDconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1391,7 +1394,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
@ -1403,10 +1406,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(ADDconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(ADDconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1415,7 +1419,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
@ -1427,10 +1431,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(SUBconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(SUBconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1439,7 +1444,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -1451,10 +1456,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(SUBconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(SUBconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1463,7 +1469,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -1475,10 +1481,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(SUBconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(SUBconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1487,7 +1494,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -1499,10 +1506,11 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
break
|
||||
}
|
||||
// match: (ADD a p:(SUBconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (ADD <t> a p:(SUBconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (ADD <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
|
||||
a := v_0
|
||||
p := v_1
|
||||
@ -1511,7 +1519,7 @@ func rewriteValueARM64_OpARM64ADD(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
continue
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -16604,10 +16612,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg3(a, x, y)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(ADDconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(ADDconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64ADDconst {
|
||||
@ -16615,7 +16624,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -16625,10 +16634,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg(v0)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(ADDconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(ADDconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64ADDconst {
|
||||
@ -16636,7 +16646,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -16646,10 +16656,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg(v0)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(ADDconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(ADDconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64ADDconst {
|
||||
@ -16657,7 +16668,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -16667,10 +16678,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg(v0)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(ADDconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(ADDconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (SUBconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64ADDconst {
|
||||
@ -16678,7 +16690,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64SUBconst)
|
||||
@ -16688,10 +16700,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg(v0)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(SUBconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(SUBconst [c] m:(MUL _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64SUBconst {
|
||||
@ -16699,7 +16712,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MUL || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
@ -16709,10 +16722,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg(v0)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(SUBconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(SUBconst [c] m:(MULW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64SUBconst {
|
||||
@ -16720,7 +16734,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MULW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
@ -16730,10 +16744,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg(v0)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(SUBconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(SUBconst [c] m:(MNEG _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64SUBconst {
|
||||
@ -16741,7 +16756,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEG || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
@ -16751,10 +16766,11 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
v.AddArg(v0)
|
||||
return true
|
||||
}
|
||||
// match: (SUB a p:(SUBconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1
|
||||
// match: (SUB <t> a p:(SUBconst [c] m:(MNEGW _ _)))
|
||||
// cond: p.Uses==1 && m.Uses==1 && !t.IsPtrShaped()
|
||||
// result: (ADDconst [c] (SUB <v.Type> a m))
|
||||
for {
|
||||
t := v.Type
|
||||
a := v_0
|
||||
p := v_1
|
||||
if p.Op != OpARM64SUBconst {
|
||||
@ -16762,7 +16778,7 @@ func rewriteValueARM64_OpARM64SUB(v *Value) bool {
|
||||
}
|
||||
c := auxIntToInt64(p.AuxInt)
|
||||
m := p.Args[0]
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1) {
|
||||
if m.Op != OpARM64MNEGW || !(p.Uses == 1 && m.Uses == 1 && !t.IsPtrShaped()) {
|
||||
break
|
||||
}
|
||||
v.reset(OpARM64ADDconst)
|
||||
|
@ -4433,6 +4433,9 @@ func (s *state) call(n *ir.CallExpr, k callKind, returnResultAddr bool, deferExt
|
||||
callABI = s.f.ABI1
|
||||
}
|
||||
}
|
||||
if fn := n.Fun.Sym().Name; n.Fun.Sym().Pkg == ir.Pkgs.Runtime && fn == "deferrangefunc" {
|
||||
s.f.HasDeferRangeFunc = true
|
||||
}
|
||||
break
|
||||
}
|
||||
closure = s.expr(fn)
|
||||
@ -6566,10 +6569,13 @@ func genssa(f *ssa.Func, pp *objw.Progs) {
|
||||
// nop (which will never execute) after the call.
|
||||
Arch.Ginsnop(s.pp)
|
||||
}
|
||||
if openDeferInfo != nil {
|
||||
if openDeferInfo != nil || f.HasDeferRangeFunc {
|
||||
// When doing open-coded defers, generate a disconnected call to
|
||||
// deferreturn and a return. This will be used to during panic
|
||||
// recovery to unwind the stack and return back to the runtime.
|
||||
//
|
||||
// deferrangefunc needs to be sure that at least one of these exists;
|
||||
// if all returns are dead-code eliminated, there might not be.
|
||||
s.pp.NextLive = s.livenessMap.DeferReturn
|
||||
p := s.pp.Prog(obj.ACALL)
|
||||
p.To.Type = obj.TYPE_MEM
|
||||
|
@ -128,7 +128,8 @@ func runGoAuth(client *http.Client, res *http.Response, url string) {
|
||||
// If no GOAUTH command provided a credential for the given url
|
||||
// and an error occurred, log the error.
|
||||
if cfg.BuildX && url != "" {
|
||||
if ok := loadCredential(&http.Request{}, url); !ok && len(cmdErrs) > 0 {
|
||||
req := &http.Request{Header: make(http.Header)}
|
||||
if ok := loadCredential(req, url); !ok && len(cmdErrs) > 0 {
|
||||
log.Printf("GOAUTH encountered errors for %s:", url)
|
||||
for _, err := range cmdErrs {
|
||||
log.Printf(" %v", err)
|
||||
|
@ -227,21 +227,6 @@ var validLinkerFlags = []*lazyregexp.Regexp{
|
||||
re(`\./.*\.(a|o|obj|dll|dylib|so|tbd)`),
|
||||
}
|
||||
|
||||
var validLinkerFlagsOnDarwin = []*lazyregexp.Regexp{
|
||||
// The GNU linker interprets `@file` as "read command-line options from
|
||||
// file". Thus, we forbid values starting with `@` on linker flags.
|
||||
// However, this causes a problem when targeting Darwin.
|
||||
// `@executable_path`, `@loader_path`, and `@rpath` are special values
|
||||
// used in Mach-O to change the library search path and can be used in
|
||||
// conjunction with the `-install_name` and `-rpath` linker flags.
|
||||
// Since the GNU linker does not support Mach-O, targeting Darwin
|
||||
// implies not using the GNU linker. Therefore, we allow @ in the linker
|
||||
// flags if and only if cfg.Goos == "darwin" || cfg.Goos == "ios".
|
||||
re(`-Wl,-dylib_install_name,@rpath(/[^,]*)?`),
|
||||
re(`-Wl,-install_name,@rpath(/[^,]*)?`),
|
||||
re(`-Wl,-rpath,@(executable_path|loader_path)(/[^,]*)?`),
|
||||
}
|
||||
|
||||
var validLinkerFlagsWithNextArg = []string{
|
||||
"-arch",
|
||||
"-F",
|
||||
@ -264,13 +249,8 @@ func checkCompilerFlags(name, source string, list []string) error {
|
||||
}
|
||||
|
||||
func checkLinkerFlags(name, source string, list []string) error {
|
||||
validLinkerFlagsForPlatform := validLinkerFlags
|
||||
if cfg.Goos == "darwin" || cfg.Goos == "ios" {
|
||||
validLinkerFlagsForPlatform = append(validLinkerFlags, validLinkerFlagsOnDarwin...)
|
||||
}
|
||||
|
||||
checkOverrides := true
|
||||
return checkFlags(name, source, list, invalidLinkerFlags, validLinkerFlagsForPlatform, validLinkerFlagsWithNextArg, checkOverrides)
|
||||
return checkFlags(name, source, list, invalidLinkerFlags, validLinkerFlags, validLinkerFlagsWithNextArg, checkOverrides)
|
||||
}
|
||||
|
||||
// checkCompilerFlagsForInternalLink returns an error if 'list'
|
||||
|
@ -8,8 +8,6 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"cmd/go/internal/cfg"
|
||||
)
|
||||
|
||||
var goodCompilerFlags = [][]string{
|
||||
@ -247,8 +245,6 @@ var badLinkerFlags = [][]string{
|
||||
{"-Wl,--hash-style=foo"},
|
||||
{"-x", "--c"},
|
||||
{"-x", "@obj"},
|
||||
{"-Wl,-dylib_install_name,@foo"},
|
||||
{"-Wl,-install_name,@foo"},
|
||||
{"-Wl,-rpath,@foo"},
|
||||
{"-Wl,-R,foo,bar"},
|
||||
{"-Wl,-R,@foo"},
|
||||
@ -265,21 +261,6 @@ var badLinkerFlags = [][]string{
|
||||
{"./-Wl,--push-state,-R.c"},
|
||||
}
|
||||
|
||||
var goodLinkerFlagsOnDarwin = [][]string{
|
||||
{"-Wl,-dylib_install_name,@rpath"},
|
||||
{"-Wl,-dylib_install_name,@rpath/"},
|
||||
{"-Wl,-dylib_install_name,@rpath/foo"},
|
||||
{"-Wl,-install_name,@rpath"},
|
||||
{"-Wl,-install_name,@rpath/"},
|
||||
{"-Wl,-install_name,@rpath/foo"},
|
||||
{"-Wl,-rpath,@executable_path"},
|
||||
{"-Wl,-rpath,@executable_path/"},
|
||||
{"-Wl,-rpath,@executable_path/foo"},
|
||||
{"-Wl,-rpath,@loader_path"},
|
||||
{"-Wl,-rpath,@loader_path/"},
|
||||
{"-Wl,-rpath,@loader_path/foo"},
|
||||
}
|
||||
|
||||
func TestCheckLinkerFlags(t *testing.T) {
|
||||
for _, f := range goodLinkerFlags {
|
||||
if err := checkLinkerFlags("test", "test", f); err != nil {
|
||||
@ -291,31 +272,6 @@ func TestCheckLinkerFlags(t *testing.T) {
|
||||
t.Errorf("missing error for %q", f)
|
||||
}
|
||||
}
|
||||
|
||||
goos := cfg.Goos
|
||||
|
||||
cfg.Goos = "darwin"
|
||||
for _, f := range goodLinkerFlagsOnDarwin {
|
||||
if err := checkLinkerFlags("test", "test", f); err != nil {
|
||||
t.Errorf("unexpected error for %q: %v", f, err)
|
||||
}
|
||||
}
|
||||
|
||||
cfg.Goos = "ios"
|
||||
for _, f := range goodLinkerFlagsOnDarwin {
|
||||
if err := checkLinkerFlags("test", "test", f); err != nil {
|
||||
t.Errorf("unexpected error for %q: %v", f, err)
|
||||
}
|
||||
}
|
||||
|
||||
cfg.Goos = "linux"
|
||||
for _, f := range goodLinkerFlagsOnDarwin {
|
||||
if err := checkLinkerFlags("test", "test", f); err == nil {
|
||||
t.Errorf("missing error for %q", f)
|
||||
}
|
||||
}
|
||||
|
||||
cfg.Goos = goos
|
||||
}
|
||||
|
||||
func TestCheckFlagAllowDisallow(t *testing.T) {
|
||||
|
2
src/cmd/go/testdata/script/goauth_git.txt
vendored
2
src/cmd/go/testdata/script/goauth_git.txt
vendored
@ -49,6 +49,8 @@ go get vcs-test.golang.org/auth/or401
|
||||
go mod tidy
|
||||
go list all
|
||||
stdout vcs-test.golang.org/auth/or404
|
||||
# With cached credentials, re-downloading in debug mode should succeed.
|
||||
go get -x vcs-test.golang.org/auth/or401
|
||||
|
||||
# Clearing GOAUTH credentials should result in failures.
|
||||
env GOAUTH='off'
|
||||
|
@ -33,6 +33,7 @@ import (
|
||||
// See issues 36852, 41409, and 43687.
|
||||
// (Also see golang.org/issue/27348.)
|
||||
func TestAllDependencies(t *testing.T) {
|
||||
t.Skip("TODO(#71986): 1.24.1 contains unreleased changes from vendored modules")
|
||||
goBin := testenv.GoToolPath(t)
|
||||
|
||||
// Ensure that all packages imported within GOROOT
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"internal/godebug"
|
||||
)
|
||||
|
||||
var fips140GODEBUG = godebug.New("#fips140")
|
||||
var fips140GODEBUG = godebug.New("fips140")
|
||||
|
||||
// Enabled reports whether the cryptography libraries are operating in FIPS
|
||||
// 140-3 mode.
|
||||
|
@ -100,7 +100,7 @@ func init() {
|
||||
clear(nbuf[:])
|
||||
h.Reset()
|
||||
|
||||
if godebug.Value("#fips140") == "debug" {
|
||||
if godebug.Value("fips140") == "debug" {
|
||||
println("fips140: verified code+data")
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
|
||||
// Enabled reports whether FIPS 140-only mode is enabled, in which non-approved
|
||||
// cryptography returns an error or panics.
|
||||
var Enabled = godebug.New("#fips140").Value() == "only"
|
||||
var Enabled = godebug.New("fips140").Value() == "only"
|
||||
|
||||
func ApprovedHash(h hash.Hash) bool {
|
||||
switch h.(type) {
|
||||
|
@ -26,7 +26,7 @@ func TestFIPSCheckVerify(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
if godebug.New("#fips140").Value() == "on" {
|
||||
if godebug.New("fips140").Value() == "on" {
|
||||
t.Fatalf("GODEBUG=fips140=on but verification did not run")
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
"encoding/binary"
|
||||
"flag"
|
||||
"fmt"
|
||||
"internal/obscuretestdata"
|
||||
"internal/testenv"
|
||||
"os"
|
||||
"os/exec"
|
||||
@ -275,24 +276,16 @@ func TestReadFile(t *testing.T) {
|
||||
|
||||
// Test117 verifies that parsing of the old, pre-1.18 format works.
|
||||
func Test117(t *testing.T) {
|
||||
// go117 was generated for linux-amd64 with:
|
||||
//
|
||||
// main.go:
|
||||
//
|
||||
// package main
|
||||
// func main() {}
|
||||
//
|
||||
// GOTOOLCHAIN=go1.17 go mod init example.com/go117
|
||||
// GOTOOLCHAIN=go1.17 go build
|
||||
//
|
||||
// TODO(prattmic): Ideally this would be built on the fly to better
|
||||
// cover all executable formats, but then we need a network connection
|
||||
// to download an old Go toolchain.
|
||||
info, err := buildinfo.ReadFile("testdata/go117")
|
||||
b, err := obscuretestdata.ReadFile("testdata/go117/go117.base64")
|
||||
if err != nil {
|
||||
t.Fatalf("ReadFile got err %v, want nil", err)
|
||||
}
|
||||
|
||||
info, err := buildinfo.Read(bytes.NewReader(b))
|
||||
if err != nil {
|
||||
t.Fatalf("Read got err %v, want nil", err)
|
||||
}
|
||||
|
||||
if info.GoVersion != "go1.17" {
|
||||
t.Errorf("GoVersion got %s want go1.17", info.GoVersion)
|
||||
}
|
||||
@ -306,20 +299,14 @@ func Test117(t *testing.T) {
|
||||
|
||||
// TestNotGo verifies that parsing of a non-Go binary returns the proper error.
|
||||
func TestNotGo(t *testing.T) {
|
||||
// notgo was generated for linux-amd64 with:
|
||||
//
|
||||
// main.c:
|
||||
//
|
||||
// int main(void) { return 0; }
|
||||
//
|
||||
// cc -o notgo main.c
|
||||
//
|
||||
// TODO(prattmic): Ideally this would be built on the fly to better
|
||||
// cover all executable formats, but then we need to encode the
|
||||
// intricacies of calling each platform's C compiler.
|
||||
_, err := buildinfo.ReadFile("testdata/notgo")
|
||||
b, err := obscuretestdata.ReadFile("testdata/notgo/notgo.base64")
|
||||
if err != nil {
|
||||
t.Fatalf("ReadFile got err %v, want nil", err)
|
||||
}
|
||||
|
||||
_, err = buildinfo.Read(bytes.NewReader(b))
|
||||
if err == nil {
|
||||
t.Fatalf("ReadFile got nil err, want non-nil")
|
||||
t.Fatalf("Read got nil err, want non-nil")
|
||||
}
|
||||
|
||||
// The precise error text here isn't critical, but we want something
|
||||
@ -410,13 +397,13 @@ func TestIssue54968(t *testing.T) {
|
||||
}
|
||||
|
||||
func FuzzRead(f *testing.F) {
|
||||
go117, err := os.ReadFile("testdata/go117")
|
||||
go117, err := obscuretestdata.ReadFile("testdata/go117/go117.base64")
|
||||
if err != nil {
|
||||
f.Errorf("Error reading go117: %v", err)
|
||||
}
|
||||
f.Add(go117)
|
||||
|
||||
notgo, err := os.ReadFile("testdata/notgo")
|
||||
notgo, err := obscuretestdata.ReadFile("testdata/notgo/notgo.base64")
|
||||
if err != nil {
|
||||
f.Errorf("Error reading notgo: %v", err)
|
||||
}
|
||||
|
BIN
src/debug/buildinfo/testdata/go117
vendored
BIN
src/debug/buildinfo/testdata/go117
vendored
Binary file not shown.
15
src/debug/buildinfo/testdata/go117/README.md
vendored
Normal file
15
src/debug/buildinfo/testdata/go117/README.md
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
go117.base64 is a base64-encoded Go 1.17 hello world binary used to test
|
||||
debug/buildinfo of pre-1.18 buildinfo encoding.
|
||||
|
||||
The binary is base64 encoded to hide it from security scanners that believe a
|
||||
Go 1.17 is inherently insecure.
|
||||
|
||||
Generate go117.base64 with:
|
||||
|
||||
$ GOTOOLCHAIN=go1.17 GOOS=linux GOARCH=amd64 go build -trimpath
|
||||
$ base64 go117 > go117.base64
|
||||
$ rm go117
|
||||
|
||||
TODO(prattmic): Ideally this would be built on the fly to better cover all
|
||||
executable formats, but then we need a network connection to download an old Go
|
||||
toolchain.
|
3
src/debug/buildinfo/testdata/go117/go.mod
vendored
Normal file
3
src/debug/buildinfo/testdata/go117/go.mod
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
module example.com/go117
|
||||
|
||||
go 1.17
|
20314
src/debug/buildinfo/testdata/go117/go117.base64
vendored
Normal file
20314
src/debug/buildinfo/testdata/go117/go117.base64
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
src/debug/buildinfo/testdata/go117/main.go
vendored
Normal file
7
src/debug/buildinfo/testdata/go117/main.go
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
func main() {}
|
BIN
src/debug/buildinfo/testdata/notgo
vendored
BIN
src/debug/buildinfo/testdata/notgo
vendored
Binary file not shown.
17
src/debug/buildinfo/testdata/notgo/README.md
vendored
Normal file
17
src/debug/buildinfo/testdata/notgo/README.md
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
notgo.base64 is a base64-encoded C hello world binary used to test
|
||||
debug/buildinfo errors on non-Go binaries.
|
||||
|
||||
The binary is base64 encoded to hide it from security scanners that might not
|
||||
like it.
|
||||
|
||||
Generate notgo.base64 on linux-amd64 with:
|
||||
|
||||
$ cc -o notgo main.c
|
||||
$ base64 notgo > notgo.base64
|
||||
$ rm notgo
|
||||
|
||||
The current binary was built with "gcc version 14.2.0 (Debian 14.2.0-3+build4)".
|
||||
|
||||
TODO(prattmic): Ideally this would be built on the fly to better cover all
|
||||
executable formats, but then we need to encode the intricacies of calling each
|
||||
platform's C compiler.
|
7
src/debug/buildinfo/testdata/notgo/main.c
vendored
Normal file
7
src/debug/buildinfo/testdata/notgo/main.c
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
278
src/debug/buildinfo/testdata/notgo/notgo.base64
vendored
Normal file
278
src/debug/buildinfo/testdata/notgo/notgo.base64
vendored
Normal file
@ -0,0 +1,278 @@
|
||||
f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAQBAAAAAAAABAAAAAAAAAAGA2AAAAAAAAAAAAAEAAOAAN
|
||||
AEAAHgAdAAYAAAAEAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAA2AIAAAAAAADYAgAAAAAAAAgA
|
||||
AAAAAAAAAwAAAAQAAAAYAwAAAAAAABgDAAAAAAAAGAMAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAA
|
||||
AAAAAAABAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAFAAAAAAAA4AUAAAAAAAAAEAAA
|
||||
AAAAAAEAAAAFAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAPQEAAAAAAAA9AQAAAAAAAAAQAAAA
|
||||
AAAAAQAAAAQAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAADcAAAAAAAAANwAAAAAAAAAABAAAAAA
|
||||
AAABAAAABgAAAAAuAAAAAAAAAD4AAAAAAAAAPgAAAAAAABACAAAAAAAAGAIAAAAAAAAAEAAAAAAA
|
||||
AAIAAAAGAAAAEC4AAAAAAAAQPgAAAAAAABA+AAAAAAAAsAEAAAAAAACwAQAAAAAAAAgAAAAAAAAA
|
||||
BAAAAAQAAAA4AwAAAAAAADgDAAAAAAAAOAMAAAAAAAAgAAAAAAAAACAAAAAAAAAACAAAAAAAAAAE
|
||||
AAAABAAAAFgDAAAAAAAAWAMAAAAAAABYAwAAAAAAAEQAAAAAAAAARAAAAAAAAAAEAAAAAAAAAFPl
|
||||
dGQEAAAAOAMAAAAAAAA4AwAAAAAAADgDAAAAAAAAIAAAAAAAAAAgAAAAAAAAAAgAAAAAAAAAUOV0
|
||||
ZAQAAAAEIAAAAAAAAAQgAAAAAAAABCAAAAAAAAAsAAAAAAAAACwAAAAAAAAABAAAAAAAAABR5X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AAAAA
|
@ -28,6 +28,7 @@ var All = []Info{
|
||||
{Name: "asynctimerchan", Package: "time", Changed: 23, Old: "1"},
|
||||
{Name: "dataindependenttiming", Package: "crypto/subtle", Opaque: true},
|
||||
{Name: "execerrdot", Package: "os/exec"},
|
||||
{Name: "fips140", Package: "crypto/fips140", Opaque: true},
|
||||
{Name: "gocachehash", Package: "cmd/go"},
|
||||
{Name: "gocachetest", Package: "cmd/go"},
|
||||
{Name: "gocacheverify", Package: "cmd/go"},
|
||||
|
@ -11,12 +11,15 @@ import (
|
||||
"internal/testenv"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
@ -24,6 +27,7 @@ import (
|
||||
|
||||
func init() {
|
||||
registerHelperCommand("pwd", cmdPwd)
|
||||
registerHelperCommand("signaltest", cmdSignalTest)
|
||||
}
|
||||
|
||||
func cmdPwd(...string) {
|
||||
@ -274,3 +278,55 @@ func TestExplicitPWD(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Issue 71828.
|
||||
func TestSIGCHLD(t *testing.T) {
|
||||
cmd := helperCommand(t, "signaltest")
|
||||
out, err := cmd.CombinedOutput()
|
||||
t.Logf("%s", out)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
// cmdSignaltest is for TestSIGCHLD.
|
||||
// This runs in a separate process because the bug only happened
|
||||
// the first time that a child process was started.
|
||||
func cmdSignalTest(...string) {
|
||||
chSig := make(chan os.Signal, 1)
|
||||
signal.Notify(chSig, syscall.SIGCHLD)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
c := 0
|
||||
for range chSig {
|
||||
c++
|
||||
fmt.Printf("SIGCHLD %d\n", c)
|
||||
if c > 1 {
|
||||
fmt.Println("too many SIGCHLD signals")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}()
|
||||
defer func() {
|
||||
signal.Reset(syscall.SIGCHLD)
|
||||
close(chSig)
|
||||
wg.Wait()
|
||||
}()
|
||||
|
||||
exe, err := os.Executable()
|
||||
if err != nil {
|
||||
fmt.Printf("os.Executable failed: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
cmd := exec.Command(exe, "hang", "200ms")
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
fmt.Printf("failed to run child process: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
@ -3848,3 +3848,14 @@ func TestRemoveReadOnlyFile(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestOpenFileDevNull(t *testing.T) {
|
||||
// See https://go.dev/issue/71752.
|
||||
t.Parallel()
|
||||
|
||||
f, err := OpenFile(DevNull, O_WRONLY|O_CREATE|O_TRUNC, 0o644)
|
||||
if err != nil {
|
||||
t.Fatalf("OpenFile(DevNull): %v", err)
|
||||
}
|
||||
f.Close()
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ func OpenInRoot(dir, name string) (*File, error) {
|
||||
// - When GOOS=plan9 or GOOS=js, Root does not track directories across renames.
|
||||
// On these platforms, a Root references a directory name, not a file descriptor.
|
||||
type Root struct {
|
||||
root root
|
||||
root *root
|
||||
}
|
||||
|
||||
const (
|
||||
|
@ -49,7 +49,7 @@ func newRoot(name string) (*Root, error) {
|
||||
if !fi.IsDir() {
|
||||
return nil, errors.New("not a directory")
|
||||
}
|
||||
return &Root{root{name: name}}, nil
|
||||
return &Root{&root{name: name}}, nil
|
||||
}
|
||||
|
||||
func (r *root) Close() error {
|
||||
|
@ -48,11 +48,11 @@ func newRoot(fd int, name string) (*Root, error) {
|
||||
syscall.CloseOnExec(fd)
|
||||
}
|
||||
|
||||
r := &Root{root{
|
||||
r := &Root{&root{
|
||||
fd: fd,
|
||||
name: name,
|
||||
}}
|
||||
runtime.SetFinalizer(&r.root, (*root).Close)
|
||||
runtime.SetFinalizer(r.root, (*root).Close)
|
||||
return r, nil
|
||||
}
|
||||
|
||||
|
@ -105,11 +105,11 @@ func newRoot(fd syscall.Handle, name string) (*Root, error) {
|
||||
return nil, &PathError{Op: "open", Path: name, Err: errors.New("not a directory")}
|
||||
}
|
||||
|
||||
r := &Root{root{
|
||||
r := &Root{&root{
|
||||
fd: fd,
|
||||
name: name,
|
||||
}}
|
||||
runtime.SetFinalizer(&r.root, (*root).Close)
|
||||
runtime.SetFinalizer(r.root, (*root).Close)
|
||||
return r, nil
|
||||
}
|
||||
|
||||
|
@ -4,15 +4,24 @@
|
||||
|
||||
package reflect
|
||||
|
||||
import "iter"
|
||||
import (
|
||||
"iter"
|
||||
)
|
||||
|
||||
func rangeNum[T int8 | int16 | int32 | int64 | int |
|
||||
uint8 | uint16 | uint32 | uint64 | uint |
|
||||
uintptr, N int64 | uint64](v N) iter.Seq[Value] {
|
||||
uintptr, N int64 | uint64](num N, t Type) iter.Seq[Value] {
|
||||
return func(yield func(v Value) bool) {
|
||||
convert := t.PkgPath() != ""
|
||||
// cannot use range T(v) because no core type.
|
||||
for i := T(0); i < T(v); i++ {
|
||||
if !yield(ValueOf(i)) {
|
||||
for i := T(0); i < T(num); i++ {
|
||||
tmp := ValueOf(i)
|
||||
// if the iteration value type is define by
|
||||
// type T built-in type.
|
||||
if convert {
|
||||
tmp = tmp.Convert(t)
|
||||
}
|
||||
if !yield(tmp) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -27,7 +36,7 @@ func rangeNum[T int8 | int16 | int32 | int64 | int |
|
||||
// Uint, Uint8, Uint16, Uint32, Uint64, Uintptr,
|
||||
// Array, Chan, Map, Slice, or String.
|
||||
func (v Value) Seq() iter.Seq[Value] {
|
||||
if canRangeFunc(v.typ()) {
|
||||
if canRangeFunc(v.abiType()) {
|
||||
return func(yield func(Value) bool) {
|
||||
rf := MakeFunc(v.Type().In(0), func(in []Value) []Value {
|
||||
return []Value{ValueOf(yield(in[0]))}
|
||||
@ -35,29 +44,29 @@ func (v Value) Seq() iter.Seq[Value] {
|
||||
v.Call([]Value{rf})
|
||||
}
|
||||
}
|
||||
switch v.Kind() {
|
||||
switch v.kind() {
|
||||
case Int:
|
||||
return rangeNum[int](v.Int())
|
||||
return rangeNum[int](v.Int(), v.Type())
|
||||
case Int8:
|
||||
return rangeNum[int8](v.Int())
|
||||
return rangeNum[int8](v.Int(), v.Type())
|
||||
case Int16:
|
||||
return rangeNum[int16](v.Int())
|
||||
return rangeNum[int16](v.Int(), v.Type())
|
||||
case Int32:
|
||||
return rangeNum[int32](v.Int())
|
||||
return rangeNum[int32](v.Int(), v.Type())
|
||||
case Int64:
|
||||
return rangeNum[int64](v.Int())
|
||||
return rangeNum[int64](v.Int(), v.Type())
|
||||
case Uint:
|
||||
return rangeNum[uint](v.Uint())
|
||||
return rangeNum[uint](v.Uint(), v.Type())
|
||||
case Uint8:
|
||||
return rangeNum[uint8](v.Uint())
|
||||
return rangeNum[uint8](v.Uint(), v.Type())
|
||||
case Uint16:
|
||||
return rangeNum[uint16](v.Uint())
|
||||
return rangeNum[uint16](v.Uint(), v.Type())
|
||||
case Uint32:
|
||||
return rangeNum[uint32](v.Uint())
|
||||
return rangeNum[uint32](v.Uint(), v.Type())
|
||||
case Uint64:
|
||||
return rangeNum[uint64](v.Uint())
|
||||
return rangeNum[uint64](v.Uint(), v.Type())
|
||||
case Uintptr:
|
||||
return rangeNum[uintptr](v.Uint())
|
||||
return rangeNum[uintptr](v.Uint(), v.Type())
|
||||
case Pointer:
|
||||
if v.Elem().kind() != Array {
|
||||
break
|
||||
@ -113,7 +122,7 @@ func (v Value) Seq() iter.Seq[Value] {
|
||||
// If v's kind is Pointer, the pointer element type must have kind Array.
|
||||
// Otherwise v's kind must be Array, Map, Slice, or String.
|
||||
func (v Value) Seq2() iter.Seq2[Value, Value] {
|
||||
if canRangeFunc2(v.typ()) {
|
||||
if canRangeFunc2(v.abiType()) {
|
||||
return func(yield func(Value, Value) bool) {
|
||||
rf := MakeFunc(v.Type().In(0), func(in []Value) []Value {
|
||||
return []Value{ValueOf(yield(in[0], in[1]))}
|
||||
|
@ -7,10 +7,13 @@ package reflect_test
|
||||
import (
|
||||
"iter"
|
||||
"maps"
|
||||
"reflect"
|
||||
. "reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type N int8
|
||||
|
||||
func TestValueSeq(t *testing.T) {
|
||||
m := map[string]int{
|
||||
"1": 1,
|
||||
@ -173,6 +176,33 @@ func TestValueSeq(t *testing.T) {
|
||||
t.Fatalf("should loop four times")
|
||||
}
|
||||
}},
|
||||
{"method", ValueOf(methodIter{}).Method(0), func(t *testing.T, s iter.Seq[Value]) {
|
||||
i := int64(0)
|
||||
for v := range s {
|
||||
if v.Int() != i {
|
||||
t.Fatalf("got %d, want %d", v.Int(), i)
|
||||
}
|
||||
i++
|
||||
}
|
||||
if i != 4 {
|
||||
t.Fatalf("should loop four times")
|
||||
}
|
||||
}},
|
||||
{"type N int8", ValueOf(N(4)), func(t *testing.T, s iter.Seq[Value]) {
|
||||
i := N(0)
|
||||
for v := range s {
|
||||
if v.Int() != int64(i) {
|
||||
t.Fatalf("got %d, want %d", v.Int(), i)
|
||||
}
|
||||
i++
|
||||
if v.Type() != reflect.TypeOf(i) {
|
||||
t.Fatalf("got %s, want %s", v.Type(), reflect.TypeOf(i))
|
||||
}
|
||||
}
|
||||
if i != 4 {
|
||||
t.Fatalf("should loop four times")
|
||||
}
|
||||
}},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
seq := tc.val.Seq()
|
||||
@ -293,9 +323,84 @@ func TestValueSeq2(t *testing.T) {
|
||||
t.Fatalf("should loop four times")
|
||||
}
|
||||
}},
|
||||
{"method", ValueOf(methodIter2{}).Method(0), func(t *testing.T, s iter.Seq2[Value, Value]) {
|
||||
i := int64(0)
|
||||
for v1, v2 := range s {
|
||||
if v1.Int() != i {
|
||||
t.Fatalf("got %d, want %d", v1.Int(), i)
|
||||
}
|
||||
i++
|
||||
if v2.Int() != i {
|
||||
t.Fatalf("got %d, want %d", v2.Int(), i)
|
||||
}
|
||||
}
|
||||
if i != 4 {
|
||||
t.Fatalf("should loop four times")
|
||||
}
|
||||
}},
|
||||
{"[4]N", ValueOf([4]N{0, 1, 2, 3}), func(t *testing.T, s iter.Seq2[Value, Value]) {
|
||||
i := N(0)
|
||||
for v1, v2 := range s {
|
||||
if v1.Int() != int64(i) {
|
||||
t.Fatalf("got %d, want %d", v1.Int(), i)
|
||||
}
|
||||
if v2.Int() != int64(i) {
|
||||
t.Fatalf("got %d, want %d", v2.Int(), i)
|
||||
}
|
||||
i++
|
||||
if v2.Type() != reflect.TypeOf(i) {
|
||||
t.Fatalf("got %s, want %s", v2.Type(), reflect.TypeOf(i))
|
||||
}
|
||||
}
|
||||
if i != 4 {
|
||||
t.Fatalf("should loop four times")
|
||||
}
|
||||
}},
|
||||
{"[]N", ValueOf([]N{1, 2, 3, 4}), func(t *testing.T, s iter.Seq2[Value, Value]) {
|
||||
i := N(0)
|
||||
for v1, v2 := range s {
|
||||
if v1.Int() != int64(i) {
|
||||
t.Fatalf("got %d, want %d", v1.Int(), i)
|
||||
}
|
||||
i++
|
||||
if v2.Int() != int64(i) {
|
||||
t.Fatalf("got %d, want %d", v2.Int(), i)
|
||||
}
|
||||
if v2.Type() != reflect.TypeOf(i) {
|
||||
t.Fatalf("got %s, want %s", v2.Type(), reflect.TypeOf(i))
|
||||
}
|
||||
}
|
||||
if i != 4 {
|
||||
t.Fatalf("should loop four times")
|
||||
}
|
||||
}},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
seq := tc.val.Seq2()
|
||||
tc.check(t, seq)
|
||||
}
|
||||
}
|
||||
|
||||
// methodIter is a type from which we can derive a method
|
||||
// value that is an iter.Seq.
|
||||
type methodIter struct{}
|
||||
|
||||
func (methodIter) Seq(yield func(int) bool) {
|
||||
for i := range 4 {
|
||||
if !yield(i) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// methodIter2 is a type from which we can derive a method
|
||||
// value that is an iter.Seq2.
|
||||
type methodIter2 struct{}
|
||||
|
||||
func (methodIter2) Seq2(yield func(int, int) bool) {
|
||||
for i := range 4 {
|
||||
if !yield(i, i+1) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,6 +93,9 @@ func (f flag) ro() flag {
|
||||
return 0
|
||||
}
|
||||
|
||||
// typ returns the *abi.Type stored in the Value. This method is fast,
|
||||
// but it doesn't always return the correct type for the Value.
|
||||
// See abiType and Type, which do return the correct type.
|
||||
func (v Value) typ() *abi.Type {
|
||||
// Types are either static (for compiler-created types) or
|
||||
// heap-allocated but always reachable (for reflection-created
|
||||
@ -2380,14 +2383,26 @@ func (v Value) Type() Type {
|
||||
return v.typeSlow()
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func (v Value) typeSlow() Type {
|
||||
return toRType(v.abiTypeSlow())
|
||||
}
|
||||
|
||||
func (v Value) abiType() *abi.Type {
|
||||
if v.flag != 0 && v.flag&flagMethod == 0 {
|
||||
return v.typ()
|
||||
}
|
||||
return v.abiTypeSlow()
|
||||
}
|
||||
|
||||
func (v Value) abiTypeSlow() *abi.Type {
|
||||
if v.flag == 0 {
|
||||
panic(&ValueError{"reflect.Value.Type", Invalid})
|
||||
}
|
||||
|
||||
typ := v.typ()
|
||||
if v.flag&flagMethod == 0 {
|
||||
return toRType(v.typ())
|
||||
return v.typ()
|
||||
}
|
||||
|
||||
// Method value.
|
||||
@ -2400,7 +2415,7 @@ func (v Value) typeSlow() Type {
|
||||
panic("reflect: internal error: invalid method index")
|
||||
}
|
||||
m := &tt.Methods[i]
|
||||
return toRType(typeOffFor(typ, m.Typ))
|
||||
return typeOffFor(typ, m.Typ)
|
||||
}
|
||||
// Method on concrete type.
|
||||
ms := typ.ExportedMethods()
|
||||
@ -2408,7 +2423,7 @@ func (v Value) typeSlow() Type {
|
||||
panic("reflect: internal error: invalid method index")
|
||||
}
|
||||
m := ms[i]
|
||||
return toRType(typeOffFor(typ, m.Mtyp))
|
||||
return typeOffFor(typ, m.Mtyp)
|
||||
}
|
||||
|
||||
// CanUint reports whether [Value.Uint] can be used without panicking.
|
||||
|
@ -25,7 +25,8 @@ package cgo
|
||||
|
||||
// Use -fno-stack-protector to avoid problems locating the
|
||||
// proper support functions. See issues #52919, #54313, #58385.
|
||||
#cgo CFLAGS: -Wall -Werror -fno-stack-protector
|
||||
// Use -Wdeclaration-after-statement because some CI builds use it.
|
||||
#cgo CFLAGS: -Wall -Werror -fno-stack-protector -Wdeclaration-after-statement
|
||||
|
||||
#cgo solaris CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS
|
||||
|
||||
|
@ -76,19 +76,27 @@ threadentry(void *v)
|
||||
static void
|
||||
init_working_dir()
|
||||
{
|
||||
CFBundleRef bundle = CFBundleGetMainBundle();
|
||||
CFBundleRef bundle;
|
||||
CFURLRef url_ref;
|
||||
CFStringRef url_str_ref;
|
||||
char buf[MAXPATHLEN];
|
||||
Boolean res;
|
||||
int url_len;
|
||||
char *dir;
|
||||
CFStringRef wd_ref;
|
||||
|
||||
bundle = CFBundleGetMainBundle();
|
||||
if (bundle == NULL) {
|
||||
fprintf(stderr, "runtime/cgo: no main bundle\n");
|
||||
return;
|
||||
}
|
||||
CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
|
||||
url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
|
||||
if (url_ref == NULL) {
|
||||
// No Info.plist found. It can happen on Corellium virtual devices.
|
||||
return;
|
||||
}
|
||||
CFStringRef url_str_ref = CFURLGetString(url_ref);
|
||||
char buf[MAXPATHLEN];
|
||||
Boolean res = CFStringGetCString(url_str_ref, buf, sizeof(buf), kCFStringEncodingUTF8);
|
||||
url_str_ref = CFURLGetString(url_ref);
|
||||
res = CFStringGetCString(url_str_ref, buf, sizeof(buf), kCFStringEncodingUTF8);
|
||||
CFRelease(url_ref);
|
||||
if (!res) {
|
||||
fprintf(stderr, "runtime/cgo: cannot get URL string\n");
|
||||
@ -97,13 +105,13 @@ init_working_dir()
|
||||
|
||||
// url is of the form "file:///path/to/Info.plist".
|
||||
// strip it down to the working directory "/path/to".
|
||||
int url_len = strlen(buf);
|
||||
url_len = strlen(buf);
|
||||
if (url_len < sizeof("file://")+sizeof("/Info.plist")) {
|
||||
fprintf(stderr, "runtime/cgo: bad URL: %s\n", buf);
|
||||
return;
|
||||
}
|
||||
buf[url_len-sizeof("/Info.plist")+1] = 0;
|
||||
char *dir = &buf[0] + sizeof("file://")-1;
|
||||
dir = &buf[0] + sizeof("file://")-1;
|
||||
|
||||
if (chdir(dir) != 0) {
|
||||
fprintf(stderr, "runtime/cgo: chdir(%s) failed\n", dir);
|
||||
@ -111,7 +119,7 @@ init_working_dir()
|
||||
|
||||
// The test harness in go_ios_exec passes the relative working directory
|
||||
// in the GoExecWrapperWorkingDirectory property of the app bundle.
|
||||
CFStringRef wd_ref = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("GoExecWrapperWorkingDirectory"));
|
||||
wd_ref = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("GoExecWrapperWorkingDirectory"));
|
||||
if (wd_ref != NULL) {
|
||||
if (!CFStringGetCString(wd_ref, buf, sizeof(buf), kCFStringEncodingUTF8)) {
|
||||
fprintf(stderr, "runtime/cgo: cannot get GoExecWrapperWorkingDirectory string\n");
|
||||
|
@ -39,10 +39,11 @@ void
|
||||
x_cgo_sys_thread_create(void* (*func)(void*), void* arg) {
|
||||
pthread_attr_t attr;
|
||||
pthread_t p;
|
||||
int err;
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
int err = _cgo_try_pthread_create(&p, &attr, func, arg);
|
||||
err = _cgo_try_pthread_create(&p, &attr, func, arg);
|
||||
if (err != 0) {
|
||||
fprintf(stderr, "pthread_create failed: %s", strerror(err));
|
||||
abort();
|
||||
@ -52,9 +53,11 @@ x_cgo_sys_thread_create(void* (*func)(void*), void* arg) {
|
||||
uintptr_t
|
||||
_cgo_wait_runtime_init_done(void) {
|
||||
void (*pfn)(struct context_arg*);
|
||||
int done;
|
||||
|
||||
pfn = __atomic_load_n(&cgo_context_function, __ATOMIC_CONSUME);
|
||||
|
||||
int done = 2;
|
||||
done = 2;
|
||||
if (__atomic_load_n(&runtime_init_done, __ATOMIC_CONSUME) != done) {
|
||||
pthread_mutex_lock(&runtime_init_mu);
|
||||
while (__atomic_load_n(&runtime_init_done, __ATOMIC_CONSUME) == 0) {
|
||||
|
@ -75,8 +75,10 @@ x_cgo_sys_thread_create(void (*func)(void*), void* arg) {
|
||||
|
||||
int
|
||||
_cgo_is_runtime_initialized() {
|
||||
int status;
|
||||
|
||||
EnterCriticalSection(&runtime_init_cs);
|
||||
int status = runtime_init_done;
|
||||
status = runtime_init_done;
|
||||
LeaveCriticalSection(&runtime_init_cs);
|
||||
return status;
|
||||
}
|
||||
|
@ -30,8 +30,10 @@ import (
|
||||
// unreachable at the same time, their cleanups all become eligible to run
|
||||
// and can run in any order. This is true even if the objects form a cycle.
|
||||
//
|
||||
// A single goroutine runs all cleanup calls for a program, sequentially. If a
|
||||
// cleanup function must run for a long time, it should create a new goroutine.
|
||||
// Cleanups run concurrently with any user-created goroutines.
|
||||
// Cleanups may also run concurrently with one another (unlike finalizers).
|
||||
// If a cleanup function must run for a long time, it should create a new goroutine
|
||||
// to avoid blocking the execution of other cleanups.
|
||||
//
|
||||
// If ptr has both a cleanup and a finalizer, the cleanup will only run once
|
||||
// it has been finalized and becomes unreachable without an associated finalizer.
|
||||
|
@ -391,10 +391,15 @@ func deferrangefunc() any {
|
||||
throw("defer on system stack")
|
||||
}
|
||||
|
||||
fn := findfunc(sys.GetCallerPC())
|
||||
if fn.deferreturn == 0 {
|
||||
throw("no deferreturn")
|
||||
}
|
||||
|
||||
d := newdefer()
|
||||
d.link = gp._defer
|
||||
gp._defer = d
|
||||
d.pc = sys.GetCallerPC()
|
||||
d.pc = fn.entry() + uintptr(fn.deferreturn)
|
||||
// We must not be preempted between calling GetCallerSP and
|
||||
// storing it to d.sp because GetCallerSP's result is a
|
||||
// uintptr stack pointer.
|
||||
@ -1246,6 +1251,8 @@ func recovery(gp *g) {
|
||||
// only gets us to the caller's fp.
|
||||
gp.sched.bp = sp - goarch.PtrSize
|
||||
}
|
||||
// The value in ret is delivered IN A REGISTER, even if there is a
|
||||
// stack ABI.
|
||||
gp.sched.ret = 1
|
||||
gogo(&gp.sched)
|
||||
}
|
||||
|
@ -312,6 +312,16 @@ func asmcgocall(fn, arg unsafe.Pointer) int32
|
||||
|
||||
func morestack()
|
||||
|
||||
// morestack_noctxt should be an internal detail,
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/bytedance/sonic
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issues/67401.
|
||||
// See go.dev/issues/71672.
|
||||
//
|
||||
//go:linkname morestack_noctxt
|
||||
func morestack_noctxt()
|
||||
|
||||
func rt0_go()
|
||||
|
@ -480,7 +480,18 @@ var pinnedTypemaps []map[typeOff]*_type
|
||||
// the relocated one.
|
||||
var aixStaticDataBase uintptr // linker symbol
|
||||
|
||||
var firstmoduledata moduledata // linker symbol
|
||||
var firstmoduledata moduledata // linker symbol
|
||||
|
||||
// lastmoduledatap should be an internal detail,
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/bytedance/sonic
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issues/67401.
|
||||
// See go.dev/issues/71672.
|
||||
//
|
||||
//go:linkname lastmoduledatap
|
||||
var lastmoduledatap *moduledata // linker symbol
|
||||
|
||||
var modulesSlice *[]*moduledata // see activeModules
|
||||
@ -591,6 +602,16 @@ func moduledataverify() {
|
||||
|
||||
const debugPcln = false
|
||||
|
||||
// moduledataverify1 should be an internal detail,
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/bytedance/sonic
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issues/67401.
|
||||
// See go.dev/issues/71672.
|
||||
//
|
||||
//go:linkname moduledataverify1
|
||||
func moduledataverify1(datap *moduledata) {
|
||||
// Check that the pclntab's format is valid.
|
||||
hdr := datap.pcHeader
|
||||
|
@ -112,9 +112,10 @@ TEXT runtime·usleep(SB),NOSPLIT,$16-4
|
||||
MOVW $1000000, R3
|
||||
DIVD R3, R2
|
||||
MOVD R2, 8(R15)
|
||||
MOVW $1000, R3
|
||||
MULLD R2, R3
|
||||
MULLD R2, R3 // Convert sec to usec and subtract
|
||||
SUB R3, R4
|
||||
MOVW $1000, R3
|
||||
MULLD R3, R4 // Convert remaining usec into nsec.
|
||||
MOVD R4, 16(R15)
|
||||
|
||||
// nanosleep(&ts, 0)
|
||||
|
@ -779,7 +779,12 @@ func os_checkClonePidfd() error {
|
||||
var err error
|
||||
for {
|
||||
var status WaitStatus
|
||||
_, err = Wait4(int(pid), &status, 0, nil)
|
||||
// WCLONE is an untyped constant that sets bit 31, so
|
||||
// it cannot convert directly to int on 32-bit
|
||||
// GOARCHes. We must convert through another type
|
||||
// first.
|
||||
flags := uint(WCLONE)
|
||||
_, err = Wait4(int(pid), &status, int(flags), nil)
|
||||
if err != EINTR {
|
||||
break
|
||||
}
|
||||
@ -797,7 +802,7 @@ func os_checkClonePidfd() error {
|
||||
|
||||
for {
|
||||
const _P_PIDFD = 3
|
||||
_, _, errno = Syscall6(SYS_WAITID, _P_PIDFD, uintptr(pidfd), 0, WEXITED, 0, 0)
|
||||
_, _, errno = Syscall6(SYS_WAITID, _P_PIDFD, uintptr(pidfd), 0, WEXITED | WCLONE, 0, 0)
|
||||
if errno != EINTR {
|
||||
break
|
||||
}
|
||||
@ -818,7 +823,7 @@ func os_checkClonePidfd() error {
|
||||
//
|
||||
//go:noinline
|
||||
func doCheckClonePidfd(pidfd *int32) (pid uintptr, errno Errno) {
|
||||
flags := uintptr(CLONE_VFORK | CLONE_VM | CLONE_PIDFD | SIGCHLD)
|
||||
flags := uintptr(CLONE_VFORK | CLONE_VM | CLONE_PIDFD)
|
||||
if runtime.GOARCH == "s390x" {
|
||||
// On Linux/s390, the first two arguments of clone(2) are swapped.
|
||||
pid, errno = rawVforkSyscall(SYS_CLONE, 0, flags, uintptr(unsafe.Pointer(pidfd)))
|
||||
|
@ -23,15 +23,26 @@ var constants = jsFS.Get("constants")
|
||||
var uint8Array = js.Global().Get("Uint8Array")
|
||||
|
||||
var (
|
||||
nodeWRONLY = constants.Get("O_WRONLY").Int()
|
||||
nodeRDWR = constants.Get("O_RDWR").Int()
|
||||
nodeCREATE = constants.Get("O_CREAT").Int()
|
||||
nodeTRUNC = constants.Get("O_TRUNC").Int()
|
||||
nodeAPPEND = constants.Get("O_APPEND").Int()
|
||||
nodeEXCL = constants.Get("O_EXCL").Int()
|
||||
nodeDIRECTORY = constants.Get("O_DIRECTORY").Int()
|
||||
nodeWRONLY = constants.Get("O_WRONLY").Int()
|
||||
nodeRDWR = constants.Get("O_RDWR").Int()
|
||||
nodeCREATE = constants.Get("O_CREAT").Int()
|
||||
nodeTRUNC = constants.Get("O_TRUNC").Int()
|
||||
nodeAPPEND = constants.Get("O_APPEND").Int()
|
||||
nodeEXCL = constants.Get("O_EXCL").Int()
|
||||
|
||||
// NodeJS on Windows does not support O_DIRECTORY, so we default
|
||||
// to -1 and assign it in init if available.
|
||||
// See https://nodejs.org/docs/latest/api/fs.html#file-open-constants.
|
||||
nodeDIRECTORY = -1
|
||||
)
|
||||
|
||||
func init() {
|
||||
oDir := constants.Get("O_DIRECTORY")
|
||||
if !oDir.IsUndefined() {
|
||||
nodeDIRECTORY = oDir.Int()
|
||||
}
|
||||
}
|
||||
|
||||
type jsFile struct {
|
||||
path string
|
||||
entries []string
|
||||
@ -85,7 +96,11 @@ func Open(path string, openmode int, perm uint32) (int, error) {
|
||||
return 0, errors.New("syscall.Open: O_SYNC is not supported by js/wasm")
|
||||
}
|
||||
if openmode&O_DIRECTORY != 0 {
|
||||
flags |= nodeDIRECTORY
|
||||
if nodeDIRECTORY != -1 {
|
||||
flags |= nodeDIRECTORY
|
||||
} else {
|
||||
return 0, errors.New("syscall.Open: O_DIRECTORY is not supported on Windows")
|
||||
}
|
||||
}
|
||||
|
||||
jsFD, err := fsCall("open", path, flags, perm)
|
||||
|
@ -235,7 +235,7 @@ func NewCallbackCDecl(fn any) uintptr {
|
||||
//sys GetVersion() (ver uint32, err error)
|
||||
//sys formatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
|
||||
//sys ExitProcess(exitcode uint32)
|
||||
//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
|
||||
//sys createFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval == InvalidHandle || e1 == ERROR_ALREADY_EXISTS ] = CreateFileW
|
||||
//sys readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = ReadFile
|
||||
//sys writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = WriteFile
|
||||
//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
|
||||
@ -404,8 +404,8 @@ func Open(name string, flag int, perm uint32) (fd Handle, err error) {
|
||||
const _FILE_FLAG_WRITE_THROUGH = 0x80000000
|
||||
attrs |= _FILE_FLAG_WRITE_THROUGH
|
||||
}
|
||||
h, err := CreateFile(namep, access, sharemode, sa, createmode, attrs, 0)
|
||||
if err != nil {
|
||||
h, err := createFile(namep, access, sharemode, sa, createmode, attrs, 0)
|
||||
if h == InvalidHandle {
|
||||
if err == ERROR_ACCESS_DENIED && (flag&O_WRONLY != 0 || flag&O_RDWR != 0) {
|
||||
// We should return EISDIR when we are trying to open a directory with write access.
|
||||
fa, e1 := GetFileAttributes(namep)
|
||||
@ -413,9 +413,11 @@ func Open(name string, flag int, perm uint32) (fd Handle, err error) {
|
||||
err = EISDIR
|
||||
}
|
||||
}
|
||||
return InvalidHandle, err
|
||||
return h, err
|
||||
}
|
||||
if flag&O_TRUNC == O_TRUNC {
|
||||
// Ignore O_TRUNC if the file has just been created.
|
||||
if flag&O_TRUNC == O_TRUNC &&
|
||||
(createmode == OPEN_EXISTING || (createmode == OPEN_ALWAYS && err == ERROR_ALREADY_EXISTS)) {
|
||||
err = Ftruncate(h, 0)
|
||||
if err != nil {
|
||||
CloseHandle(h)
|
||||
@ -1454,3 +1456,13 @@ func GetStartupInfo(startupInfo *StartupInfo) error {
|
||||
getStartupInfo(startupInfo)
|
||||
return nil
|
||||
}
|
||||
|
||||
func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) {
|
||||
handle, err = createFile(name, access, mode, sa, createmode, attrs, templatefile)
|
||||
if handle != InvalidHandle {
|
||||
// CreateFileW can return ERROR_ALREADY_EXISTS with a valid handle.
|
||||
// We only want to return an error if the handle is invalid.
|
||||
err = nil
|
||||
}
|
||||
return handle, err
|
||||
}
|
||||
|
@ -502,10 +502,10 @@ func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxS
|
||||
return
|
||||
}
|
||||
|
||||
func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) {
|
||||
func createFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) {
|
||||
r0, _, e1 := Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
|
||||
handle = Handle(r0)
|
||||
if handle == InvalidHandle {
|
||||
if handle == InvalidHandle || e1 == ERROR_ALREADY_EXISTS {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
|
10
src/vendor/golang.org/x/net/http/httpproxy/proxy.go
generated
vendored
10
src/vendor/golang.org/x/net/http/httpproxy/proxy.go
generated
vendored
@ -14,6 +14,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/netip"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
@ -177,8 +178,10 @@ func (cfg *config) useProxy(addr string) bool {
|
||||
if host == "localhost" {
|
||||
return false
|
||||
}
|
||||
ip := net.ParseIP(host)
|
||||
if ip != nil {
|
||||
nip, err := netip.ParseAddr(host)
|
||||
var ip net.IP
|
||||
if err == nil {
|
||||
ip = net.IP(nip.AsSlice())
|
||||
if ip.IsLoopback() {
|
||||
return false
|
||||
}
|
||||
@ -360,6 +363,9 @@ type domainMatch struct {
|
||||
}
|
||||
|
||||
func (m domainMatch) match(host, port string, ip net.IP) bool {
|
||||
if ip != nil {
|
||||
return false
|
||||
}
|
||||
if strings.HasSuffix(host, m.host) || (m.matchHost && host == m.host[1:]) {
|
||||
return m.port == "" || m.port == port
|
||||
}
|
||||
|
@ -56,6 +56,9 @@ import (
|
||||
// referenced object. Typically, this batching only happens for tiny
|
||||
// (on the order of 16 bytes or less) and pointer-free objects.
|
||||
type Pointer[T any] struct {
|
||||
// Mention T in the type definition to prevent conversions
|
||||
// between Pointer types, like we do for sync/atomic.Pointer.
|
||||
_ [0]*T
|
||||
u unsafe.Pointer
|
||||
}
|
||||
|
||||
@ -69,7 +72,7 @@ func Make[T any](ptr *T) Pointer[T] {
|
||||
u = runtime_registerWeakPointer(unsafe.Pointer(ptr))
|
||||
}
|
||||
runtime.KeepAlive(ptr)
|
||||
return Pointer[T]{u}
|
||||
return Pointer[T]{u: u}
|
||||
}
|
||||
|
||||
// Value returns the original pointer used to create the weak pointer.
|
||||
|
@ -6,10 +6,12 @@ package weak_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"internal/goarch"
|
||||
"runtime"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
"unsafe"
|
||||
"weak"
|
||||
)
|
||||
|
||||
@ -155,6 +157,14 @@ func TestPointerFinalizer(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestPointerSize(t *testing.T) {
|
||||
var p weak.Pointer[T]
|
||||
size := unsafe.Sizeof(p)
|
||||
if size != goarch.PtrSize {
|
||||
t.Errorf("weak.Pointer[T] size = %d, want %d", size, goarch.PtrSize)
|
||||
}
|
||||
}
|
||||
|
||||
// Regression test for issue 69210.
|
||||
//
|
||||
// Weak-to-strong conversions must shade the new strong pointer, otherwise
|
||||
|
99
test/fixedbugs/issue71675.go
Normal file
99
test/fixedbugs/issue71675.go
Normal file
@ -0,0 +1,99 @@
|
||||
// run
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
package main
|
||||
|
||||
//go:noinline
|
||||
func i() {
|
||||
for range yieldInts {
|
||||
defer func() {
|
||||
println("I")
|
||||
recover()
|
||||
}()
|
||||
}
|
||||
// This panic causes dead code elimination of the return block.
|
||||
// The compiler should nonetheless emit a deferreturn.
|
||||
panic("i panic")
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func h() {
|
||||
defer func() {
|
||||
println("H first")
|
||||
}()
|
||||
for range yieldInts {
|
||||
defer func() {
|
||||
println("H second")
|
||||
}()
|
||||
}
|
||||
defer func() {
|
||||
println("H third")
|
||||
}()
|
||||
for range yieldIntsPanic {
|
||||
defer func() {
|
||||
println("h recover:called")
|
||||
recover()
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func yieldInts(yield func(int) bool) {
|
||||
if !yield(0) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func g() {
|
||||
defer func() {
|
||||
println("G first")
|
||||
}()
|
||||
for range yieldIntsPanic {
|
||||
defer func() {
|
||||
println("g recover:called")
|
||||
recover()
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func yieldIntsPanic(yield func(int) bool) {
|
||||
if !yield(0) {
|
||||
return
|
||||
}
|
||||
panic("yield stop")
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func next(i int) int {
|
||||
if i == 0 {
|
||||
panic("next stop")
|
||||
}
|
||||
return i + 1
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func f() {
|
||||
defer func() {
|
||||
println("F first")
|
||||
}()
|
||||
for i := 0; i < 1; i = next(i) {
|
||||
defer func() {
|
||||
println("f recover:called")
|
||||
recover()
|
||||
}()
|
||||
}
|
||||
}
|
||||
func main() {
|
||||
f()
|
||||
println("f returned")
|
||||
g()
|
||||
println("g returned")
|
||||
h()
|
||||
println("h returned")
|
||||
i()
|
||||
println("i returned")
|
||||
|
||||
}
|
13
test/fixedbugs/issue71675.out
Normal file
13
test/fixedbugs/issue71675.out
Normal file
@ -0,0 +1,13 @@
|
||||
f recover:called
|
||||
F first
|
||||
f returned
|
||||
g recover:called
|
||||
G first
|
||||
g returned
|
||||
h recover:called
|
||||
H third
|
||||
H second
|
||||
H first
|
||||
h returned
|
||||
I
|
||||
i returned
|
28
test/fixedbugs/issue71680.go
Normal file
28
test/fixedbugs/issue71680.go
Normal file
@ -0,0 +1,28 @@
|
||||
// compile
|
||||
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package p
|
||||
|
||||
type Parser struct{}
|
||||
type Node struct{}
|
||||
|
||||
type parserState func(p *Parser) parserState
|
||||
|
||||
func parserStateData(root *Node) parserState {
|
||||
return func(p *Parser) parserState {
|
||||
return parserStateOpenMap(root)(p)
|
||||
}
|
||||
}
|
||||
|
||||
func parserStateOpenMap(root *Node) parserState {
|
||||
return func(p *Parser) parserState {
|
||||
switch {
|
||||
case p != nil:
|
||||
return parserStateData(root)(p)
|
||||
}
|
||||
return parserStateOpenMap(root)(p)
|
||||
}
|
||||
}
|
23
test/fixedbugs/issue71852.go
Normal file
23
test/fixedbugs/issue71852.go
Normal file
@ -0,0 +1,23 @@
|
||||
// compile
|
||||
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"math"
|
||||
)
|
||||
|
||||
func main() {
|
||||
test(2)
|
||||
}
|
||||
|
||||
func test(i int) {
|
||||
if i <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
_ = math.Pow10(i + 2)
|
||||
}
|
29
test/fixedbugs/issue71857.go
Normal file
29
test/fixedbugs/issue71857.go
Normal file
@ -0,0 +1,29 @@
|
||||
// run
|
||||
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
import "sync/atomic"
|
||||
|
||||
//go:noinline
|
||||
func f(p0, p1, p2, p3, p4, p5, p6, p7 *uint64, a *atomic.Uint64) {
|
||||
old := a.Or(0xaaa)
|
||||
*p0 = old
|
||||
*p1 = old
|
||||
*p2 = old
|
||||
*p3 = old
|
||||
*p4 = old
|
||||
*p5 = old
|
||||
*p6 = old
|
||||
*p7 = old
|
||||
}
|
||||
|
||||
func main() {
|
||||
a := new(atomic.Uint64)
|
||||
p := new(uint64)
|
||||
f(p, p, p, p, p, p, p, p, a)
|
||||
|
||||
}
|
50
test/fixedbugs/issue71932.go
Normal file
50
test/fixedbugs/issue71932.go
Normal file
@ -0,0 +1,50 @@
|
||||
// run
|
||||
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
import "runtime"
|
||||
|
||||
const C = 16
|
||||
|
||||
type T [C * C]byte
|
||||
|
||||
func main() {
|
||||
var ts []*T
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
t := new(T)
|
||||
// Save every even object.
|
||||
if i%2 == 0 {
|
||||
ts = append(ts, t)
|
||||
}
|
||||
}
|
||||
// Make sure the odd objects are collected.
|
||||
runtime.GC()
|
||||
|
||||
for _, t := range ts {
|
||||
f(t, C, C)
|
||||
}
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func f(t *T, i, j uint) {
|
||||
if i == 0 || i > C || j == 0 || j > C {
|
||||
return // gets rid of bounds check below (via prove pass)
|
||||
}
|
||||
p := &t[i*j-1]
|
||||
*p = 0
|
||||
runtime.GC()
|
||||
*p = 0
|
||||
|
||||
// This goes badly if compiled to
|
||||
// q := &t[i*j]
|
||||
// *(q-1) = 0
|
||||
// runtime.GC()
|
||||
// *(q-1) = 0
|
||||
// as at the GC call, q is an invalid pointer
|
||||
// (it points past the end of t's allocation).
|
||||
}
|
24
test/weak.go
Normal file
24
test/weak.go
Normal file
@ -0,0 +1,24 @@
|
||||
// errorcheck
|
||||
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Test weak pointers.
|
||||
|
||||
package p
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"weak"
|
||||
)
|
||||
|
||||
// Adapted from example in https://github.com/golang/go/issues/67552#issuecomment-2639661220
|
||||
func conversion() {
|
||||
p := "hello"
|
||||
a := weak.Make(&p)
|
||||
b := (weak.Pointer[*byte])(a) // ERROR "cannot convert a \(variable of struct type weak\.Pointer\[string\]\) to type weak.Pointer\[\*byte\]"
|
||||
c := b.Value()
|
||||
println(**c)
|
||||
runtime.KeepAlive(p)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user