Re: Translatable strings not marked 'c-format'

2018-06-27 Thread Nick Clifton
Hi Ask,

> But what if by accident I change it to %pA?  In between the thousands
> of messages and dozens of languages, the probability of this happening
> approaches one (Murphy's law).  I mischievously typed "%pA" instead,
> and it produced no error. 

Hmm, well mistakes can always happen, and I am not sure if there is much
more that we can do about it. 

> Now we can be pretty certain that these
> errors will happen at runtime, and the question is whether the
> formatting functions handle them gracefully, crash, or output things
> from random places in memory.

An abort or garbage output are the most likely outcomes.  The formatting
functions do perform some sanity checks, but there is only so much that
can be done.

In the end we have to rely upon bug reports from the users saying something
like "the linker crashes when I run it with this input using this translation".

Cheers
  Nick





___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/23348] New: binutils strip corrupts binaries produced by clang+lld+mingw-w64 toolchain

2018-06-27 Thread jacek at codeweavers dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23348

Bug ID: 23348
   Summary: binutils strip corrupts binaries produced by
clang+lld+mingw-w64 toolchain
   Product: binutils
   Version: 2.32 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: jacek at codeweavers dot com
  Target Milestone: ---

Created attachment 11103
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11103&action=edit
test.exe

The problem can be reproduced by toolchains using mingw-w64 with clang and lld
such as:
https://github.com/mstorsjo/llvm-mingw
or attempts to build Mozilla with similar config:
https://bugzilla.mozilla.org/show_bug.cgi?id=1465798

Stripped binaries can't be ran on Windows and instead I get "is not a valid
win32 application" error. Experimenting a bit, I found if we use -Wl,-s to let
linker strip the binaries and then strip again with binutils, the resulting
file is fine.

To reproduce:

$ cat test.c
#include 

int main() {
printf("hello world\n");
return 0;
}
$ x86_64-w64-mingw32-clang test.c -o test.exe
# test.exe works fine
$ x86_64-w64-mingw32-strip test.exe  -o test-stripped-by-binutils.exe
# test-stripped-by-binutils.exe is corrupted

I will attach test.exe and test-stripped-by-binutils.exe.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/22755] gold test suite failures (gentoo, 2.31)

2018-06-27 Thread dilfridge at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22755

Andreas K. Huettel  changed:

   What|Removed |Added

Summary|gold test suite failures|gold test suite failures
   |(gentoo, 2.30)  |(gentoo, 2.31)

--- Comment #2 from Andreas K. Huettel  ---
Sorry, I somehow did not notice your comment. Updated information for 2.31
(current tip of release branch) follows; looks pretty similar. gcc-7.3.0,
glibc-2.26-r7, 4.14.51-gentoo x86_64


   gold 0.1: testsuite/test-suite.log


# TOTAL: 275
# PASS:  257
# SKIP:  0
# XFAIL: 0
# FAIL:  18
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: strong_ref_weak_def.sh


pattern ".* FUNC.* GLOBAL.* UND.* weak_def" not found in file
strong_ref_weak_def.stdout.

FAIL strong_ref_weak_def.sh (exit status: 1)

FAIL: dyn_weak_ref.sh
=

pattern ".* WEAK .* UND.* weak_ref" not found in file dyn_weak_ref.stdout.

FAIL dyn_weak_ref.sh (exit status: 1)

FAIL: large_symbol_alignment


FAIL large_symbol_alignment (exit status: 1)

FAIL: exception_separate_shared_12_test
===

./exception_separate_shared_12_test: symbol lookup error:
./exception_shared_1.so: undefined symbol: _Z2f1v
FAIL exception_separate_shared_12_test (exit status: 127)

FAIL: exception_separate_shared_21_test
===

./exception_separate_shared_21_test: symbol lookup error:
./exception_shared_1.so: undefined symbol: _Z2f1v
FAIL exception_separate_shared_21_test (exit status: 127)

FAIL: weak_undef_test
=

FAILED weak undef test 4: &no_such_symbol_ is not NULL
FAIL weak_undef_test (exit status: 1)

FAIL: initpri3a
===

initpri3a:
/var/tmp/portage/sys-devel/binutils-2.31./work/binutils/gold/testsuite/initpri3.c:40:
ctor2: Assertion `i == 2' failed.
FAIL initpri3a (exit status: 134)

FAIL: script_test_1
===

script_test_1:
/var/tmp/portage/sys-devel/binutils-2.31./work/binutils/gold/testsuite/script_test_1b.cc:31:
void check_int(intptr_t, intptr_t): Assertion `i == j' failed.
FAIL script_test_1 (exit status: 134)

FAIL: script_test_2
===

script_test_2:
/var/tmp/portage/sys-devel/binutils-2.31./work/binutils/gold/testsuite/script_test_2.cc:44:
int main(int, char**): Assertion `reinterpret_cast(start_test_area)
== 0x2001' failed.
FAIL script_test_2 (exit status: 134)

FAIL: justsyms
==

justsyms:
/var/tmp/portage/sys-devel/binutils-2.31./work/binutils/gold/testsuite/justsyms_1.cc:47:
int main(int, char**): Assertion `reinterpret_cast(justsyms_string)
== 0x100' failed.
FAIL justsyms (exit status: 134)

FAIL: justsyms_exec
===

&exported_func is 0x55df339b8200, expected 01000200
&exported_data is 0x55df349b8000, expected 0200
FAIL justsyms_exec (exit status: 2)

FAIL: binary_test
=

binary_test:
/var/tmp/portage/sys-devel/binutils-2.31./work/binutils/gold/testsuite/binary_test.cc:39:
int main(int, char**): Assertion `size == _binary_binary_txt_end -
_binary_binary_txt_start' failed.
FAIL binary_test (exit status: 134)

FAIL: script_test_3
===

FAIL script_test_3 (exit status: 139)

FAIL: tls_phdrs_script_test
===

FAIL tls_phdrs_script_test (exit status: 139)

FAIL: script_test_12i
=

FAIL script_test_12i (exit status: 1)

FAIL: dynamic_list_2


FAIL dynamic_list_2 (exit status: 1)

FAIL: incremental_test_2


incremental_test_2:
/var/tmp/portage/sys-devel/binutils-2.31./work/binutils/gold/testsuite/two_file_test_main.cc:50:
int main(): Assertion `t12()' failed.
FAIL incremental_test_2 (exit status: 134)

FAIL: incremental_test_5


incremental_test_5:
/var/tmp/portage/sys-devel/binutils-2.31./work/binutils/gold/testsuite/two_file_test_main.cc:50:
int main(): Assertion `t12()' failed.
FAIL incremental_test_5 (exit status: 134)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/23348] binutils strip corrupts binaries produced by clang+lld+mingw-w64 toolchain

2018-06-27 Thread jacek at codeweavers dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23348

Jacek Caban  changed:

   What|Removed |Added

 Target||x86_64-w64-mingw32

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/23348] binutils strip corrupts binaries produced by clang+lld+mingw-w64 toolchain

2018-06-27 Thread jacek at codeweavers dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23348

--- Comment #1 from Jacek Caban  ---
Created attachment 11104
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11104&action=edit
test-stripped-by-binutils.exe

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/22755] gold test suite failures (gentoo, 2.31)

2018-06-27 Thread dilfridge at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22755

Andreas K. Huettel  changed:

   What|Removed |Added

Version|2.30|2.31

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/22755] gold test suite failures (gentoo, 2.31)

2018-06-27 Thread dilfridge at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22755

--- Comment #3 from Andreas K. Huettel  ---
Created attachment 11105
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11105&action=edit
gold/config.log

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils