Age | Commit message (Collapse) | Author | Files | Lines |
|
Reviewed-on: https://go-review.googlesource.com/69891
From-SVN: r253664
|
|
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/67111
From-SVN: r253292
|
|
We don't need them, and this fixes the build when using uClibc-ng
1.0.26 as originally reported at
https://gcc.gnu.org/ml/gcc-patches/2017-09/msg01930.html
Reviewed-on: https://go-review.googlesource.com/67110
From-SVN: r253291
|
|
Reviewed-on: https://go-review.googlesource.com/64550
From-SVN: r253231
|
|
Reviewed-on: https://go-review.googlesource.com/64592
From-SVN: r253105
|
|
With -enable-static=no we don't build non-pic objects, but libgotool.a
is built from non-pic objects. Build the packages that go into
libgotool.a in static mode in all cases.
Also ensure that internal test packages are built, since nothing
explicitly depended on them.
Reviewed-on: https://go-review.googlesource.com/65050
From-SVN: r253042
|
|
Reviewed-on: https://go-review.googlesource.com/64990
From-SVN: r253022
|
|
Reviewed-on: https://go-review.googlesource.com/64552
From-SVN: r253021
|
|
Reviewed-on: https://go-review.googlesource.com/64551
From-SVN: r253016
|
|
In the 1.9 upgrade I took out the word "goroutine" from a traceback
showing a goroutine running in C code, to let TestCgoNumGoroutine
pass. However, it turns out that some code is actually checking for
that string; for example,
https://github.com/grpc/grpc-go/blob/master/test/leakcheck/leakcheck.go#L44
So keep the message the same, and change the test.
Reviewed-on: https://go-review.googlesource.com/64850
From-SVN: r252991
|
|
Reviewed-on: https://go-review.googlesource.com/64110
From-SVN: r252953
|
|
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/64170
From-SVN: r252866
|
|
Reviewed-on: https://go-review.googlesource.com/63753
From-SVN: r252767
|
|
In preparation for upgrading libgo to the 1.9 release, this
approximately incorporates https://golang.org/cl/37661 and
https://golang.org/cl/38351.
CL 37661 changed the gc compiler such that the select statement simply
returns an integer which is then used as the argument for a switch.
Since gccgo already worked that way, this just adjusts the switch code
to look like the gc switch code by removing the explicit case index
expression and calculating it from the order of calls to selectsend,
selectrecv, and selectdefault.
CL 38351 simplifies the channel code by not passing the unused channel
type descriptor pointer.
Reviewed-on: https://go-review.googlesource.com/62730
From-SVN: r252749
|
|
This adds much of https://golang.org/cl/35731 and
https://golang.org/cl/35732 to the gofrontend code.
This is a step toward updating libgo to the 1.9 release. The
gofrontend already supports type aliases, and this is required for
correct support of type aliases when used as embedded fields.
The change to expressions.cc is to handle the << 1, used for the
newly renamed offsetAnon field, in the constant context used for type
descriptor initialization.
Reviewed-on: https://go-review.googlesource.com/62710
From-SVN: r252746
|
|
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/60732
From-SVN: r251574
|
|
Reviewed-on: https://go-review.googlesource.com/59913
From-SVN: r251440
|
|
Reviewed-on: https://go-review.googlesource.com/59912
From-SVN: r251439
|
|
Reviewed-on: https://go-review.googlesource.com/59911
From-SVN: r251436
|
|
Reviewed-on: https://go-review.googlesource.com/59910
From-SVN: r251435
|
|
Reviewed-on: https://go-review.googlesource.com/57550
From-SVN: r251420
|
|
PR go/81893
runtime: only use PPC GNU/Linux register code on little endian
Reportedly the current code builds on little endian but not big endian.
Fixes https://gcc.gnu.org/PR81893.
Reviewed-on: https://go-review.googlesource.com/57110
From-SVN: r251188
|
|
Reviewed-on: https://go-review.googlesource.com/56910
From-SVN: r251182
|
|
Using -funwind-tables is necessary to permit Go code to correctly
throw a panic through C code. This hasn't been necessary in the past
as -funwind-tables is the default on x86. However, it is not the
default for PPC AIX.
Reviewed-on: https://go-review.googlesource.com/56650
From-SVN: r251179
|
|
Reviewed-on: https://go-review.googlesource.com/54170
From-SVN: r251133
|
|
Fix dumpregs on i386, implement dumpregs for PPC Linux/AIX, get PC on AIX.
Reviewed-on: https://go-review.googlesource.com/56170
From-SVN: r251127
|
|
Libgo's implementation of math.Ldexp declared the libc "ldexp" as
taking an 'int' exponent argument, which is not quite right for 64-bit
platforms (exp arg is always int32); this could yield incorrect
results for exponent values outside the range of Minint32/Maxint32.
Fix by upating the type for the libc version of ldexp, and adding
guards to screen for out-of-range exponents.
Fixes #21323.
Reviewed-on: https://go-review.googlesource.com/54250
From-SVN: r250992
|
|
Patch from Uros Bizjak.
Reviewed-on: https://go-review.googlesource.com/53350
From-SVN: r250873
|
|
PR go/81617
libgo: change mksigtab to recognize glibc 2.26 NSIG expression
Fixes golang/go#21147
Fixes GCC PR 81617
Reviewed-on: https://go-review.googlesource.com/52611
From-SVN: r250858
|
|
Patch by Uros Bizjak.
Reviewed-on: https://go-review.googlesource.com/51370
From-SVN: r250588
|
|
We unconditionally set _FILE_OFFSET_BITS to 64 in configure.ac, so we
should unconditionally call the statfs64 and fstatfs64 functions.
These functions should be available on all versions of GNU/Linux since 2.6.
On 64-bit systems they are aliased to statfs/fstatfs, and on 32-bit
systems they use the 64-bit data structures.
Fixes golang/go#20922
Reviewed-on: https://go-review.googlesource.com/50635
From-SVN: r250443
|
|
If getSiginfo does not know how to determine the PC, it will call
runtime_callers. That can happen in a thread that was started by
non-Go code, in which case the TLS variable g will not be set, in
which case runtime_lock will crash.
Avoid the problem by using atomic operations for the lock. This is OK
since creating a backtrace state is fast and never blocks.
The test case is TestCgoExternalThreadSIGPROF in the runtime package
on a system that getSiginfo doesn't handle specially.
Updates golang/go#20931
Reviewed-on: https://go-review.googlesource.com/50650
From-SVN: r250439
|
|
Updates golang/go#20931
Reviewed-on: https://go-review.googlesource.com/50631
From-SVN: r250436
|
|
Allocate enough stack space so that the test will work on a system
that does not support split stacks.
This test is actually not very meaningful for gccgo at present, but it
doesn't hurt to keep running it.
Updates golang/go#20931
Reviewed-on: https://go-review.googlesource.com/50630
From-SVN: r250433
|
|
futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’)
PR go/81451
runtime: inline runtime_osinit
We had two identical copies of runtime_osinit. They set runtime_ncpu,
a variable that is no longer used. Removing that leaves us with two lines.
Inline those two lines in the two places the function was called.
This fixes GCC PR 81451.
Reviewed-on: https://go-review.googlesource.com/48862
From-SVN: r250326
|
|
PR go/81324
sysinfo.c: ignore ptrace_peeksiginfo_args from <linux/ptrace.h>
With some versions of glibc and GNU/Linux ptrace_pseeksiginfo_args is
defined in both <sys/ptrace.h> and <linux/ptrace.h>. We don't actually
care about the struct, so use a #define to avoid a redefinition error.
This fixes https://gcc.gnu.org/PR81324.
Reviewed-on: https://go-review.googlesource.com/49290
From-SVN: r250324
|
|
https://gcc.gnu.org/PR81449 reports a problem with the definition semt
in runtime.inc on some systems. Since the C code in libgo/runtime
doesn't need semt, just don't copy it into runtime.inc.
Reviewed-on: https://go-review.googlesource.com/48593
From-SVN: r250217
|
|
Don't assume that all (or only) 386/amd64 compilers support
-fsplit-stack.
Reviewed-on: https://go-review.googlesource.com/48592
From-SVN: r250216
|
|
against recent glibc)
PR go/81393
syscall: don't use GETREGS/SETREGS on s390
They were removed in recent glibc.
Patch by Andreas Krebbel for GCC PR 81393.
Reviewed-on: https://go-review.googlesource.com/48231
From-SVN: r250174
|
|
This test is not yet run, but it will be soon.
Reviewed-on: https://go-review.googlesource.com/47038
From-SVN: r249795
|
|
The tests are misc/cgo tests that are not currently run but will be
run soon.
Reviewed-on: https://go-review.googlesource.com/47037
From-SVN: r249794
|
|
On AIX:
* mmap does not allow to map an already mapped range,
* mmap range start at 0x30000000 for 32 bits processes,
* mmap range start at 0x70000000_00000000 for 64 bits processes
This is adapted from change 37845.
Issue golang/go#19200
Reviewed-on: https://go-review.googlesource.com/46772
From-SVN: r249713
|
|
Fixes required now that we #include <linux/ptrace.h> in sysinfo.c.
Patch by Andreas Krebbel.
Reviewed-on: https://go-review.googlesource.com/46839
From-SVN: r249712
|
|
Copy all the misc/cgo files from the gc toolchain into libgo/misc.
These will be used for testing purposes by later changes to the
gotools directory.
Reviewed-on: https://go-review.googlesource.com/46721
From-SVN: r249674
|
|
It's now defined by mksysinfo.sh.
Patch by Uros Bizjak.
Reviewed-on: https://go-review.googlesource.com/46712
From-SVN: r249663
|
|
Avoid https://sourceware.org/bugzilla/show_bug.cgi?id=762.
Patch by Andreas Schwab.
Reviewed-on: https://go-review.googlesource.com/46711
From-SVN: r249662
|
|
When C code calls a Go function, it actually calls a function
generated by cgo. That function is written in Go, and, among other
things, it calls the real Go function like this:
CgocallBack()
defer CgocallBackDone()
RealGoFunction()
The deferred CgocallBackDone function enters syscall mode as we return
to C. Typically the C function will then eventually return to Go.
However, in the case where the C function is running on a thread
created in C, it will not return to Go. For that case we will have
allocated an m struct, with an associated g struct, for the duration
of the Go code, and when the Go is complete we will return the m and g
to a free list.
That all works, but we are running in a deferred function, which means
that we have been invoked by deferreturn, and deferreturn expects to
do a bit of cleanup to record that the defer has been completed. Doing
that cleanup while using an m and g that have already been returned to
the free list is clearly a bad idea. It was kind of working because
deferreturn was holding the g pointer in a local variable, but there
were races with some other thread picking up and using the newly freed g.
It was also kind of working because of a special check in freedefer;
that check is no longer necessary.
This patch changes the special case of releasing the m and g to do the
defer cleanup in CgocallBackDone itself.
This patch also checks for the special case of a panic through
CgocallBackDone. In that special case, we don't want to release the m
and g. Since we are returning to C code that was not called by Go
code, we know that the panic is not going to be caught and we are
going to exit the program. So for that special case we keep the m and
g structs so that the rest of the panic code can use them.
Reviewed-on: https://go-review.googlesource.com/46530
From-SVN: r249611
|
|
Reviewed-on: https://go-review.googlesource.com/46590
From-SVN: r249609
|
|
Backport https://golang.org/cl/46511 from gc trunk, as it may fix a
bug reported for gccgo running on MIPS
(https://groups.google.com/d/msg/golang-dev/sDg-t1_DPw0/-AJmLxgPBQAJ).
Reviewed-on: https://go-review.googlesource.com/46571
From-SVN: r249599
|
|
The kickoff function for g0 can be invoked without a p, for example
from mcall(exitsyscall0) in exitsyscall after exitsyscall has cleared
the p field. The assignment gp.param = nil will invoke a write barrier.
If gp.param is not already nil, this will require a p. Avoid the problem
for a specific case that is known to be OK: when the value in gp.param
is a *g.
Reviewed-on: https://go-review.googlesource.com/46512
From-SVN: r249595
|