Age | Commit message (Collapse) | Author | Files | Lines |
|
Otherwise on a 64-bit system we will read the 32-bit value as a 64-bit
value. Since getaddrinfo returns negative numbers as error values,
these will be interpreted as numbers like 0xfffffffe rather than -2,
and the comparisons with values like syscall.EAI_NONAME will fail.
Fixes golang/go#23645
Reviewed-on: https://go-review.googlesource.com/91296
From-SVN: r257299
|
|
On ppc64 gotest treats data variables whose names begin with "Test" as
tests to run. This is to support the function descriptors used for
ppc64 ELF ABI v1. This causes gotest to think that TestAddr6 is a
test, when it is actually a variable. For a simple fix until we can
figure out how to write gotest properly, rename the variable.
Fixes golang/go#23623
Reviewed-on: https://go-review.googlesource.com/90995
From-SVN: r257235
|
|
CL 84555 added support for the SuperH architecture, but didn't add the
randomTrap definition to be used for the getrandom syscall on Linux.
Add it now.
Reviewed-on: https://go-review.googlesource.com/90535
From-SVN: r257171
|
|
Reviewed-on: https://go-review.googlesource.com/90295
From-SVN: r257127
|
|
Reviewed-on: https://go-review.googlesource.com/90295
From-SVN: r257126
|
|
This was the original intent, as reflected in the long comment at the
start of names.cc, but I forgot to implement it.
Also, remove a leading ".0" from the final name. That could occur for
a method whose receiver type starts with 'u', as in that case we
prepend a space to the mangled name, to avoid confusion with the
Unicode mangling, and the space turns into ".0".
Also, if the Unicode encoding would cause the final to start with
"..u" or "..U", add a leading underscore.
Patch gotest to not get fooled by some names.
The result of these changes is that all symbols start with a letter or
an underscore.
Reviewed-on: https://go-review.googlesource.com/90015
From-SVN: r257068
|
|
The top three region number bits must be masked out before
right-shifting the address bits into place, otherwise they will be
copied down into the lower always-zero address bits.
Reviewed-on: https://go-review.googlesource.com/84535
From-SVN: r257061
|
|
Encode all external symbol names using only ASCII alphanumeric
characters, underscore, and dot. Use a scheme that can be reliably
demangled to a somewhat readable version as described in the long
comment in names.cc.
A minor cleanup discovered during this was that we were treating
function types as different if one had a NULL parameters_ field and
another has a non-NULL parameters_ field that has no parameters. This
worked because we mangled them slightly differently. We now mangle
them the same, so we treat them as equal, as we should anyhow.
Reviewed-on: https://go-review.googlesource.com/89555
* go.go-torture/execute/names-1.go: New test.
From-SVN: r257033
|
|
Reviewed-on: https://go-review.googlesource.com/88935
From-SVN: r256971
|
|
Reviewed-on: https://go-review.googlesource.com/88236
From-SVN: r256874
|
|
Reviewed-on: https://go-review.googlesource.com/88275
From-SVN: r256873
|
|
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/88376
From-SVN: r256872
|
|
update)
PR go/83787
compiler: pass int to makechan, call makechan64 when appropriate
The update to 1.10beta1 changed makechan to take int instead of int64,
and added a makechan64 call for large values. Since the size is the
last argument to makechan, the old compiler which always passed a
64-bit int worked fine on 64-bit systems and little-endian 32-bit
systems, but broke on big-endian 32-bit systems. This CL fixes the
compiler to use the appropriate types.
This fixes GCC PR 83787.
Reviewed-on: https://go-review.googlesource.com/88077
From-SVN: r256835
|
|
Reviewed-on: https://go-review.googlesource.com/87198
From-SVN: r256810
|
|
Reviewed-on: https://go-review.googlesource.com/87897
From-SVN: r256794
|
|
Move the architecture-specific settings out of configure.ac into a new
shell script goarch.sh. Use the new script to collect the values for
all architectures to make them available in go/types.
Also fix cmd/vet to pass the right compiler when it calls SizesFor.
This fixes cmd/vet for systems that are not implemented in the gc
toolchain, such as alpha and ia64.
Reviewed-on: https://go-review.googlesource.com/87635
From-SVN: r256655
|
|
No test as the only system I know that uses 64-bit DWARF is AIX.
Backport of https://golang.org/cl/84379, which will be in Go 1.11.
Backporting now for AIX support in gccgo.
Reviewed-on: https://go-review.googlesource.com/87296
From-SVN: r256474
|
|
Reviewed-on: https://go-review.googlesource.com/87197
From-SVN: r256450
|
|
Reviewed-on: https://go-review.googlesource.com/84555
From-SVN: r256446
|
|
Add missing .a files. These should have been committed with the
update to go1.10beta1, but were skipped because by default Subversion
ignores all files matching *.a.
From-SVN: r256442
|
|
obsolescent)
PR c/82922
runtime, syscall: use full prototypes in C code
Based on patch by Martin Sebor.
Reviewed-on: https://go-review.googlesource.com/86815
From-SVN: r256437
|
|
The exp/proxy package was removed from the master library in
https://golang.org/cl/6461056 (August, 2012).
The exp/terminal package was removed from the master library in
https://golang.org/cl/5970044 (March, 2012).
I'm not sure why they lingered in the gofrontend copy, but let's
finally remove them now.
Reviewed-on: https://go-review.googlesource.com/87138
From-SVN: r256435
|
|
GCC always recognizes the -fsplit-stack option, but then tests whether
it is supported by the selected target. If not, it reports
cc1: error: ‘-fsplit-stack’ is not supported by this compiler configuration
Check for that error message when deciding whether a compiler option works.
Reviewed-on: https://go-review.googlesource.com/87137
From-SVN: r256433
|
|
When compiling runtime, it is not allowed for local variables
and closures to be heap allocated. In one test, there is a go
statement with a closure. In the gc compiler, it distinguishes
capturing variable by value vs. by address, and rewrites it to
passing the captured values as arguments. Currently we don't
have this, and the escape analysis decides to heap allocate the
closure and also the captured variables, which is not allowed.
Work around it by passing the variables explicitly.
This is in preparation of turning on escape analysis for the
runtime.
Reviewed-on: https://go-review.googlesource.com/86245
From-SVN: r256419
|
|
This is in preparation of turning on escape analysis for the
runtime.
- In gccgo, systemstack is implemented with mcall, which is not
go:noescape. Wrap the closure in noescape so the escape analysis
does not think it escapes.
- Mark some C functions go:noescape. They do not leak arguments.
- Use noescape function to make a few local variables' addresses
not escape. The escape analysis cannot figure out because they
are assigned to pointer indirections.
Reviewed-on: https://go-review.googlesource.com/86244
From-SVN: r256418
|
|
For gccgo code avoid --whole-archive and -(. Use -blibpath instead of
-rpath.
Reviewed-on: https://go-review.googlesource.com/86956
From-SVN: r256417
|
|
Reviewed-on: https://go-review.googlesource.com/86936
From-SVN: r256416
|
|
Patch from Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/87037
From-SVN: r256399
|
|
Update the Go library to the 1.10beta1 release.
Requires a few changes to the compiler for modifications to the map
runtime code, and to handle some nowritebarrier cases in the runtime.
Reviewed-on: https://go-review.googlesource.com/86455
gotools/:
* Makefile.am (go_cmd_vet_files): New variable.
(go_cmd_buildid_files, go_cmd_test2json_files): New variables.
(s-zdefaultcc): Change from constants to functions.
(noinst_PROGRAMS): Add vet, buildid, and test2json.
(cgo$(EXEEXT)): Link against $(LIBGOTOOL).
(vet$(EXEEXT)): New target.
(buildid$(EXEEXT)): New target.
(test2json$(EXEEXT)): New target.
(install-exec-local): Install all $(noinst_PROGRAMS).
(uninstall-local): Uninstasll all $(noinst_PROGRAMS).
(check-go-tool): Depend on $(noinst_PROGRAMS). Copy down
objabi.go.
(check-runtime): Depend on $(noinst_PROGRAMS).
(check-cgo-test, check-carchive-test): Likewise.
(check-vet): New target.
(check): Depend on check-vet. Look at cmd_vet-testlog.
(.PHONY): Add check-vet.
* Makefile.in: Rebuild.
From-SVN: r256365
|
|
Reviewed-on: https://go-review.googlesource.com/79375
From-SVN: r255738
|
|
Reviewed-on: https://go-review.googlesource.com/79095
From-SVN: r255737
|
|
The functions cgoCheckPointer and cgoCheckResult are called by code
generated by cgo. That means that we need to export them using
go:linkname, as otherwise they are local symbols. The cgo code
currently uses weak references to only call the symbols if they are
defined, which is why it has been working--the cgo code has not been
doing any checks.
Reviewed-on: https://go-review.googlesource.com/80295
From-SVN: r255347
|
|
Reviewed-on: https://go-review.googlesource.com/72930
From-SVN: r255090
|
|
For a misaligned address force a panic rather than assuming that reading
from the address 0 will cause one.
Reviewed-on: https://go-review.googlesource.com/69850
From-SVN: r254610
|
|
Also fix 64-bit DWARF to read a 64-bit abbrev offset in the
compilation unit.
This is a backport of https://golang.org/cl/71171, which will be in
the Go 1.10 release, to the gofrontend copy. Doing it now because AIX
is pretty much the only system that uses 64-bit DWARF.
Reviewed-on: https://go-review.googlesource.com/72250
From-SVN: r253955
|
|
Patch by Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/67111
From-SVN: r253292
|
|
Reviewed-on: https://go-review.googlesource.com/64550
From-SVN: r253231
|
|
Reviewed-on: https://go-review.googlesource.com/64592
From-SVN: r253105
|
|
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
|
|
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
|
|
Reviewed-on: https://go-review.googlesource.com/59913
From-SVN: r251440
|
|
Reviewed-on: https://go-review.googlesource.com/57550
From-SVN: r251420
|
|
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
|