PR go/60406
runtime: Check callers in can_recover if return address doesn't match.
Also use __builtin_extract_return_address and tighten up the
checks in FFI code.
Fixes PR 60406.
From-SVN: r216003
PR go/61877
refect: fix direct call of variadic method value
As reported in bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61877
gcc mainline has regressed in this. This CL adds the tests proposed
for the main Go repository:
https://codereview.appspot.com/151280043/https://codereview.appspot.com/152060043/
restores the code from the amd64/386 path that makes this work and
was lost when the Go 1.3 stdlib was merged and changes the FFI path
to call into the same helper code as the amd64/386 path.
I've only tested this on amd64 but I did test a version that was
patched to unconditionally take the FFI path.
From-SVN: r215859
This variable is unused apparently as a result of local changes.
gccgo accepts this variable declaration, but other frontends may not.
From-SVN: r212873
This revision was committed January 7, 2014. The next
revision deleted runtime/mfinal.c. That will be done in a
subsequent merge.
This merge changes type descriptors to add a zero field,
pointing to a zero value for that type. This is implemented
as a common variable.
* go-gcc.cc (Gcc_backend::implicit_variable): Add is_common and
alignment parameters. Permit init parameter to be NULL.
From-SVN: r211249
A gccgo language extension allows a function to be declared multiple
times. Avoid the use of this extension by dedeplicating declarations
in mksyscall.awk.
From-SVN: r209508
Avoid the use of a gccgo language extension which allows unsafe.Sizeof
to accept a type by passing an expression of the relevant type.
From-SVN: r209503
I am reliably informed that the architecture name and letter for the
plan9/inferno compilers for 64-bit ARM systems will be "arm64" and "7"
respectively, so let's get that bit in nice and early.
From Michael Hudson-Doyle.
https://codereview.appspot.com/34830045/
From-SVN: r206374
On Solaris, if you do a in-progress connect, and then the
server accepts and closes the socket, the client's later
attempt to complete the connect will fail with EINVAL. Handle
this case by assuming that the connect succeeded. This code
is weird enough that it is implemented as Solaris-only so that
it doesn't hide a real error on a different OS.
See http://golang.org/issue/6828.
From-SVN: r206232
PR go/59506
net: use DialTimeout in TestSelfConnect
Backported from master repository.
This avoids problems with systems that take a long time to
find out nothing is listening, while still testing for the
self-connect misfeature since a self-connect should be fast.
With this we may be able to remove the test for non-Linux
systems.
Tested (on GNU/Linux) by editing selfConnect in
tcpsock_posix.go to always return false and verifying that
TestSelfConnect then fails with and without this change.
Idea from Uros Bizjak.
From-SVN: r206224
When a 386 function returns a struct, it needs to return using
an rtd instruction that pops the hidden struct parameter off
the stack. That wasn't happening.
From-SVN: r205551
In particular this means that the names Getsockname returns are not
truncated to 26 characters.
Fixes issue 6829
https://codereview.appspot.com/31840043/
From-SVN: r205368
Fixes issue 6761
This simple change seems to work fine, slightly to my surprise.
This includes the tests I submitted to the main Go repository at
https://codereview.appspot.com/26570046
From-SVN: r205001
If cmd/go is rebuilt using -compiler gccgo the version of go/build that is linked into that cmd/go will not function properly as the list of file suffixes know as operating systems or architectures is incorrect.
From-SVN: r204794
The gccgo-specific iword function was checking v.kind, but for
a method value that is always Func. Fix to check v.typ.Kind()
instead.
From-SVN: r202670
This changes the compiler and runtime to not pass a closure
value as the last argument, but to instead pass it via
__go_set_closure and retrieve it via __go_get_closure. This
eliminates the need for function descriptor wrapper functions.
It will make it possible to retrieve the closure value in a
reflect.MakeFunc function.
From-SVN: r202233