[Bug 223680] www/firefox: DTRACE=on fails with /usr/bin/ld: error: ../../js/src/jsarray.o: string table non-null terminated

2017-11-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223680

Bug ID: 223680
   Summary: www/firefox: DTRACE=on fails with /usr/bin/ld: error:
../../js/src/jsarray.o: string table non-null
terminated
   Product: Ports & Packages
   Version: Latest
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: Individual Port(s)
  Assignee: ge...@freebsd.org
  Reporter: jbe...@freebsd.org
CC: freebsd-dtr...@freebsd.org
Blocks: 214864
  Assignee: ge...@freebsd.org
 Flags: maintainer-feedback?(ge...@freebsd.org)

I'd like to use lld in order to fix bug 222641. jsarray.o links fine until
processed by dtrace -G. bfd and gold are unaffected. Any clue why?

$ c++ -v
FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM
5.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

$ ln -fs ld.lld /usr/bin/ld
$ c++ -Wl,-V
LLD 5.0.0 (FreeBSD 312559) (compatible with GNU linkers)

$ sed -i '.bak' '/LLD_UNSAFE/d' /usr/ports/Mk/bsd.gecko.mk
$ cd /usr/ports/www/firefox
$ make
[...]
/usr/bin/ld: error: ../../js/src/jsarray.o: string table non-null terminated
c++: error: linker command failed with exit code 1 (use -v to see invocation)


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214864
[Bug 214864] [exp-run] test build with lld as /usr/bin/ld
-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223680] www/firefox: DTRACE=on fails with /usr/bin/ld: error: ../../js/src/jsarray.o: string table non-null terminated

2017-11-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223680

Jan Beich  changed:

   What|Removed |Added

   Assignee|ge...@freebsd.org   |freebsd-toolchain@FreeBSD.o
   ||rg

--- Comment #1 from Jan Beich  ---
Over to toolchain@ to investigate as gecko@ already defines LLD_UNSAFE as a
workaround.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223680] www/firefox: DTRACE=on fails with /usr/bin/ld: error: ../../js/src/jsarray.o: string table non-null terminated

2017-11-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223680

--- Comment #2 from Jan Beich  ---
Another way to reproduce:

$ ln -fs ld.lld /usr/bin/ld
$ pkg install autoconf213 gmake python27 mercurial
$ hg clone https://hg.mozilla.org/mozilla-central
$ cd mozilla-central/js/src
$ autoconf-2.13
$ ./configure --disable-jemalloc --enable-dtrace
$ gmake
[...]
/usr/bin/ld: error: ../jsarray.o: string table non-null terminated
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223680] www/firefox: DTRACE=on fails with /usr/bin/ld: error: ../../js/src/jsarray.o: string table non-null terminated

2017-11-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223680

--- Comment #3 from Dimitry Andric  ---
After dtrace processes the jsarray.o file, its .strtab session is no longer
null-terminated, e.g. before dtrace it looks like:

Hex dump of section '.strtab':
  0x 005f5a32 354a535f 5265706f 72744572 ._Z25JS_ReportEr
  0x0010 726f724e 756d6265 72415343 49495039 rorNumberASCIIP9
  0x0020 4a53436f 6e746578 74504650 4b31394a JSContextPFPK19J
  0x0030 53457272 6f72466f 726d6174 53747269 SErrorFormatStri
  0x0040 6e675076 6a455334 5f6a7a00 6d656d63 ngPvjES4_jz.memc
  0x0050 7079002e 72656c61 2e746578 742e5f5a py..rela.text._Z
  0x0060 4c323043 72656174 65417272 61795072 L20CreateArrayPr
  0x0070 6f746f74 79706550 394a5343 6f6e7465 ototypeP9JSConte
...
  0x6ea0 5f30002e 4c435049 34345f30 002e4c43 _0..LCPI44_0..LC
  0x6eb0 50493234 5f30002e 4c435049 5f30 PI24_0..LCPI33_0
  0x6ec0 002e4c43 50493233 5f30002e 4c435049 ..LCPI23_0..LCPI
  0x6ed0 325f3000 2e4c4350 4933315f 30002e4c 2_0..LCPI31_0..L
  0x6ee0 43504932 315f3000 2e4c4350 4933305f CPI21_0..LCPI30_
  0x6ef0 30002e4c 43504932 305f3000 2e4c2e73 0..LCPI20_0..L.s
  0x6f00 74722e39 30002e72 6f646174 612e5f5a tr.90..rodata._Z
  0x6f10 4c313070 6f776572 734f6631 30002e4c L10powersOf10..L
  0x6f20 2e737472 2e313000   .str.10.

After dtrace:

Hex dump of section '.strtab':
  0x 005f5a32 354a535f 5265706f 72744572 ._Z25JS_ReportEr
  0x0010 726f724e 756d6265 72415343 49495039 rorNumberASCIIP9
  0x0020 4a53436f 6e746578 74504650 4b31394a JSContextPFPK19J
  0x0030 53457272 6f72466f 726d6174 53747269 SErrorFormatStri
  0x0040 6e675076 6a455334 5f6a7a00 6d656d63 ngPvjES4_jz.memc
  0x0050 7079002e 72656c61 2e746578 742e5f5a py..rela.text._Z
  0x0060 4c323043 72656174 65417272 61795072 L20CreateArrayPr
  0x0070 6f746f74 79706550 394a5343 6f6e7465 ototypeP9JSConte
...
  0x73a0 52657573 6547726f 75704550 394a5343 ReuseGroupEP9JSC
  0x73b0 6f6e7465 78744e32 4a533648 616e646c ontextN2JS6Handl
  0x73c0 65495038 4a534f62 6a656374 45456d00 eIP8JSObjectEEm.
  0x73d0 24647472 6163652e 5f5a4e32 6a733134 $dtrace._ZN2js14
  0x73e0 4e65774f 626a6563 74436163 68653136 NewObjectCache16
  0x73f0 6e65774f 626a6563 7446726f 6d486974 newObjectFromHit
  0x7400 4550394a 53436f6e 74657874 694e535f EP9JSContextiNS_
  0x7410 32676331 31496e69 7469616c 48656170 2gc11InitialHeap
  0x7420 4500a5a5 a5a5a5a5 a5E

It looks like dtrace appends some uninitialized memory at the end of the table.
 I have not been able to successfully run valgrind on it, though, so I have no
idea where it comes from.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223680] www/firefox: DTRACE=on fails with /usr/bin/ld: error: ../../js/src/jsarray.o: string table non-null terminated

2017-11-15 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223680

Mark Johnston  changed:

   What|Removed |Added

 CC||ma...@freebsd.org
   Assignee|freebsd-toolchain@FreeBSD.o |ma...@freebsd.org
   |rg  |

--- Comment #4 from Mark Johnston  ---
This is a problem with r313504. It occurs when linking with ld.bfd as well,
it's just that lld is more strict.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"