From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: Re: [PATCH] cmake: workaround GCC 7.2 segfault on v?sn?printf
Date: Fri, 28 Dec 2018 11:24:25 +0300 [thread overview]
Message-ID: <20181228082425.vfv6gpuntbgoxaes@esperanza> (raw)
In-Reply-To: <ceb64c3581f4da17afad9acbb26b58adda60be26.1545972365.git.alexander.turenko@tarantool.org>
On Fri, Dec 28, 2018 at 07:48:54AM +0300, Alexander Turenko wrote:
> GCC 7.2.1 fails like so on our codebase:
>
> /tarantool/src/lib/json/json.c: In function ‘json_token_snprint’:
> /tarantool/src/lib/json/json.c:324:1: internal compiler error: Segmentation fault
> json_token_snprint(char *buf, int size, const struct json_token *token,
> ^~~~~~~~~~~~~~~~~~
>
> The backtrace of cc1 is the following (failed to install compatible
> debuginfo on Fedora 26, so ??s):
>
> #0 0x0000000000d0320c in get_source_location_for_substring(cpp_reader*, string_concat_db*, unsigned int, cpp_ttype, int, int, int, unsigned int*) ()
> #1 0x00000000005c0e79 in c_get_substring_location(substring_loc const&, unsigned int*) ()
> #2 0x00000000007f8418 in format_warning_va(substring_loc const&, source_range const*, char const*, int, char const*, __va_list_tag (*) [1]) ()
> #3 0x00000000007f838b in format_warning_at_substring(substring_loc const&, source_range const*, char const*, int, char const*, ...) ()
> #4 0x0000000000c72c2d in ?? ()
> #5 0x0000000000f6f308 in execute_one_pass(opt_pass*) ()
> #6 0x0000000000787da6 in ?? ()
> #7 0x00000000012ac338 in symbol_table::compile() ()
> #8 0x0000000000de650f in symbol_table::finalize_compilation_unit() ()
> #9 0x00000000012ee8df in ?? ()
> #10 0x0000000000d3ba84 in toplev::main(int, char**) ()
> #11 0x0000000000d3d35b in main ()
>
> The issue in the GCC bugtracker: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83448
>
> The idea of the commit is to check builtin snprintf with the code from
> GCC test suite and disable all related builtins if the compiler is GCC
> and the case fails.
>
> We also need to disable FORTIFY_SOURCES in the case, because it uses
> v?sn?printf builtins directly.
Frankly, I don't think it's worth adding a workaround for a buggy
compiler version that's only used by distributions that passed EOL.
IMO we'd better disable compilation for those distributions.
next prev parent reply other threads:[~2018-12-28 8:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-28 4:48 Alexander Turenko
2018-12-28 6:27 ` Alexander Turenko
2018-12-28 8:24 ` Vladimir Davydov [this message]
2018-12-28 8:51 ` [tarantool-patches] " Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181228082425.vfv6gpuntbgoxaes@esperanza \
--to=vdavydov.dev@gmail.com \
--cc=alexander.turenko@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [PATCH] cmake: workaround GCC 7.2 segfault on v?sn?printf' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox