Commit Graph

19 Commits

Author SHA1 Message Date
Ian Lance Taylor 46f120ca7b re PR go/65798 (runtime.Caller returns ok=true when return data is invalid)
PR go/65798
runtime: In Caller don't return ok == true if PC == 0.

GCC PR 65798 reports that this can happen in some cases.

From-SVN: r222204
2015-04-17 21:59:10 +00:00
Ian Lance Taylor 4729d7726b re PR go/65349 (go tool crashes, can't compile go code on 32bit linux systems)
PR go/65349
runtime: Don't call malloc from __go_file_line callback.

When crashing, we call runtime_printcreatedby which calls
__go_file_line which used to call the Go malloc.  If we are
crashing due to a signal due to heap corruption of some sort,
the GO malloc lock might already be held, leading to a crash
within a crash.  Avoid that by assuming that the libbacktrace
strings will stick around, as we already do in go-callers.c.

From-SVN: r221291
2015-03-09 23:40:58 +00:00
Ian Lance Taylor dc14e88e07 re PR other/61895 (libbacktrace crashes with bus error with empty file argv[0])
PR other/61895

runtime: Ignore small argv[0] file for backtrace.

Reportedly in some cases Docker starts processes with argv[0]
pointing to an empty file.  That would cause libgo to pass
that empty file to libbacktrace, which would then fail to do
any backtraces.  Everything should work fine if libbacktrace
falls back to /proc/self/exe.

This patch to libgo works around the problem by ignoring
argv[0] if it is a small file, or if stat fails.  This is not
a perfect fix but it's an unusual problem.

From-SVN: r213513
2014-08-02 00:54:15 +00:00
Ian Lance Taylor dffa732835 reflect, runtime: Use libffi closures to implement reflect.MakeFunc.
Keep using the existing 386 and amd64 code on those archs,
since it is more efficient.

From-SVN: r212853
2014-07-19 21:36:26 +00:00
Ian Lance Taylor 92495ff691 runtime: Update for change to libbacktrace library.
From-SVN: r205031
2013-11-19 15:02:27 +00:00
Ian Lance Taylor 37512c0399 runtime: Don't use filename without '/' for backtrace library.
Fixes http://golang.org/issue/6715.

From-SVN: r204828
2013-11-14 22:31:29 +00:00
Ian Lance Taylor f038dae646 libgo: Update to October 24 version of master library.
From-SVN: r204466
2013-11-06 19:49:01 +00:00
Ian Lance Taylor 27741f93ef runtime: In backtraces, get inline functions, skip split-stack fns.
From-SVN: r195591
2013-01-30 22:24:40 +00:00
Ian Lance Taylor f6b1e65ec3 re PR go/46986 (Go is not supported on Darwin)
PR go/46986
all: prepend #__USER_LABEL_PREFIX__ to mangled Go symbols
For old-fashioned Darwin.

From-SVN: r195438
2013-01-24 19:44:23 +00:00
Ian Lance Taylor 776f27a67f compiler, runtime: More steps toward separating int and intgo.
From-SVN: r193059
2012-11-01 03:02:13 +00:00
Ian Lance Taylor fb521d54f1 runtime: Fix __go_symbol_value val argument to backtrace_syminfo.
From-SVN: r192194
2012-10-08 04:29:47 +00:00
Ian Lance Taylor 686750d25d runtime: Use argv[0] to get executable name for backtrace.
From-SVN: r192123
2012-10-05 13:44:40 +00:00
Ian Lance Taylor 92aecb446a runtime: runtime.Caller should succeed even without debug info.
From-SVN: r191833
2012-09-28 17:42:53 +00:00
Ian Lance Taylor 0e56e59065 libgo: Use libbacktrace rather than debug/elf registration.
From-SVN: r191831
2012-09-28 14:48:30 +00:00
Ian Lance Taylor 9e65cec2fd runtime: Correct definition of __go_file_line to match declaration.
From Rainer Orth.

From-SVN: r187851
2012-05-24 20:47:09 +00:00
Ian Lance Taylor f3ab5720f7 libgo: Use -fgo-pkgpath.
From-SVN: r187485
2012-05-14 22:08:42 +00:00
Ian Lance Taylor 0effc3f961 libgo: Implement and use runtime.Caller, runtime.Func.FileLine.
From-SVN: r185025
2012-03-07 01:16:20 +00:00
Ian Lance Taylor a3bc69c529 re PR go/46958 (ARM Go Does Not Compile (__builtin_return_address))
PR go/46958
	PR go/46965
Call __builtin_return_address with 0 rather than 1.

From-SVN: r168495
2011-01-05 00:07:59 +00:00
Ian Lance Taylor 7a9389330e Add Go frontend, libgo library, and Go testsuite.
gcc/:
	* gcc.c (default_compilers): Add entry for ".go".
	* common.opt: Add -static-libgo as a driver option.
	* doc/install.texi (Configuration): Mention libgo as an option for
	--enable-shared.  Mention go as an option for --enable-languages.
	* doc/invoke.texi (Overall Options): Mention .go as a file name
	suffix.  Mention go as a -x option.
	* doc/frontends.texi (G++ and GCC): Mention Go as a supported
	language.
	* doc/sourcebuild.texi (Top Level): Mention libgo.
	* doc/standards.texi (Standards): Add section on Go language.
	Move references for other languages into their own section.
	* doc/contrib.texi (Contributors): Mention that I contributed the
	Go frontend.
gcc/testsuite/:
	* lib/go.exp: New file.
	* lib/go-dg.exp: New file.
	* lib/go-torture.exp: New file.
	* lib/target-supports.exp (check_compile): Match // Go.

From-SVN: r167407
2010-12-03 04:34:57 +00:00