[Bug libstdc++/86164] std::regex crashes when matching long lines

2023-04-09 Thread nyh at math dot technion.ac.il via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86164 --- Comment #15 from Nadav Har'El --- More than 5 years later, more and more projects are discovering this bug the hard way, and moving from std::regex to boost::regex which doesn't have this bug - boost::regex defaults to

[Bug middle-end/32667] block copy with exact overlap is expanded as memcpy

2023-01-05 Thread nyh at math dot technion.ac.il via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667 --- Comment #21 from Nadav Har'El --- This old problem has become a real problem in gcc 12 with a real effect on incorrect code generation, where code that copies an object was incorrectly "optimized" to use __builtin_memcpy() instead of

[Bug c/108296] __builtin_memcpy generating wrong code in some cases

2023-01-05 Thread nyh at math dot technion.ac.il via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108296 --- Comment #2 from Nadav Har'El --- Thanks. Interesting. So __builtin_memcpy() is simply not supposed to work correctly for overlapping areas? I now realize that according to memcpy(3) documentation, memcpy() is also not guaranteed to work

[Bug c/108296] New: __builtin_memcpy generating wrong code in some cases

2023-01-05 Thread nyh at math dot technion.ac.il via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il Target Milestone: --- The following trivial code, copying a string over itself moved by one byte, shows wrong results for __builtin_memcpy() on gcc 12.2.1: #include int main

[Bug c/106087] Segmentation fault in GIMPLE pass: ccp

2022-06-26 Thread nyh at math dot technion.ac.il via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106087 --- Comment #1 from Nadav Har'El --- Created attachment 53199 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53199=edit preprocessed source file which gcc saved for reporting the crash (compressed because of bugzilla's attachment length

[Bug c/106087] New: Segmentation fault in GIMPLE pass: ccp

2022-06-26 Thread nyh at math dot technion.ac.il via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il Target Milestone: --- When building the attached file, part of the open-source OSv project, in gcc 12.1.1 (on Fedora 36), I get: during GIMPLE pass: ccp bsd/sys/dev/hyperv/vmbus/hyperv.cc

[Bug c++/96003] [11 Regression] spurious -Wnonnull calling a member on the result of static_cast

2021-06-15 Thread nyh at math dot technion.ac.il via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96003 Nadav Har'El changed: What|Removed |Added CC||nyh at math dot technion.ac.il

[Bug libstdc++/93502] std::regex_match uses stack space proportional to input string length

2020-01-29 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93502 --- Comment #2 from Nadav Har'El --- Maybe you mean it is a dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86164 ? But I'm not sure. I honestly don't understand the conclusion there that ".*" is implemented recursively. Why would such a

[Bug c++/93502] New: std::regex_match uses stack space proportional to input string

2020-01-29 Thread nyh at math dot technion.ac.il
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il Target Milestone: --- Created attachment 47736 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47736=edit Simple test code demonstrating the bug As

[Bug c++/78940] [missed optimization] Useless guard variable in thread_local defaulted constructor

2017-01-15 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78940 --- Comment #1 from Nadav Har'El --- Technically speaking, std::atomic's default constructor is not marked "constexpr" (unlike the value-taking constructor), so I'm guessing that at the time that gcc makes the decision to have these guards, it

[Bug libgomp/65070] libgomp calls syscall instruction directly

2016-08-07 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65070 --- Comment #6 from Nadav Har'El --- Andrew, the syscall instruction may indeed be the only ABI of the Linux kernel. But I didn't create this issue on the Linux kernel mailing list, rather on the libgomp library's issue tracker. Looking a the

[Bug libstdc++/70722] include_next in cmath skips user-defined wrapper

2016-07-21 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70722 --- Comment #11 from Nadav Har'El --- By the way, I think I made a mistake in my comment and -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS is not actually needed. The thing is that header files like have: #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS

[Bug libstdc++/70722] include_next in cmath skips user-defined wrapper

2016-07-21 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70722 --- Comment #10 from Nadav Har'El --- There is nothing "holy" about glibc, and nothing "broken" about wanting to replace it (or, as Firefox did, only a part of it). Sure, the replacement needs to be 100% compatible with glibc, and if it isn't,

[Bug libstdc++/70722] include_next in cmath skips user-defined wrapper

2016-07-21 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70722 Nadav Har'El changed: What|Removed |Added CC||nyh at math dot technion.ac.il

[Bug c++/59281] attribute((constructor)) accepts enum class as integer constant

2016-07-20 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59281 Nadav Har'El changed: What|Removed |Added CC||nyh at math dot technion.ac.il

[Bug libgcc/71744] Concurrently throwing exceptions is not scalable

2016-07-03 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71744 --- Comment #5 from Nadav Har'El --- Some replies to Andrew's comments above: 1. As the number of cores continue to grow, libraries will also fix malloc scalability issues, so concurrent malloc will no longer present a problem. The code which

[Bug libstdc++/71744] New: Concurrently throwing exceptions is not scalable

2016-07-03 Thread nyh at math dot technion.ac.il
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il Target Milestone: --- Multiple threads on multiple cores should be able to concurrently throw exceptions without bothering one another. But unfortunately, it appears that in the current

[Bug libgomp/65070] libgomp calls syscall instruction directly

2015-12-23 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65070 --- Comment #4 from Nadav Har'El --- There is a fine line between relying on "Linux" (e.g., the glibc ABI functions as defined in LSB for example), and relying on obscure architecture-specific tricks (like calling the syscall *instruction* in a

[Bug libstdc++/68297] New: Faster std::make_exception

2015-11-11 Thread nyh at math dot technion.ac.il
++ Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il Target Milestone: --- std::make_exception(object) currently does this: make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT { try { throw __ex; } catch

[Bug c/67469] New: "-pie -fpie" result in BSS instead of undefined symbols

2015-09-06 Thread nyh at math dot technion.ac.il
ty: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il Target Milestone: --- I've noticed a really strange phenomenon in Gcc 5.1.1 compared to Gcc 4.9.2. I don't know if it's a bug or a feature. Consider the

[Bug go/65616] New: libgobegin.a not compiled with -fPIC

2015-03-29 Thread nyh at math dot technion.ac.il
Assignee: ian at airs dot com Reporter: nyh at math dot technion.ac.il CC: cmang at google dot com When one tries to build a position-independent executable (PIE or shared object) with gccgo, the final linking stage fails. For example: $ gccgo -pie -fpie hello.go /usr

[Bug web/65115] New: default init_priority attribute

2015-02-18 Thread nyh at math dot technion.ac.il
Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il The gcc documentation for the init_priority mentions the relative ordering of init functions with different priorities, but neglects to mention how they are ordered with other init functions which do

[Bug libgomp/65070] New: libgomp calls syscall instruction directly

2015-02-15 Thread nyh at math dot technion.ac.il
: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il CC: jakub at gcc dot gnu.org The code in libgomp/config/linux/x86/futex.h is needlessly complicated: It contains a definition of SYS_futex, and contains two variants (x86

[Bug libgomp/65070] libgomp calls syscall instruction directly

2015-02-15 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65070 --- Comment #2 from Nadav Har'El nyh at math dot technion.ac.il --- Hi, What was the intention behind this intentionally? As I mentioned above, I believe the tiny performance saving of not calling the syscall() function are minimal, because if I

[Bug c++/61973] New: __thread and deleted destructor

2014-07-31 Thread nyh at math dot technion.ac.il
++ Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il Hi, right now __thread insists that the given type has a trivial destructor. There is unfortunately no way to silence this error, even when I deliberately want this (e.g., I know I'll call ~T() explicitly

[Bug c++/58408] [C++11] __thread + trivially_constructible - error

2014-07-31 Thread nyh at math dot technion.ac.il
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58408 Nadav Har'El nyh at math dot technion.ac.il changed: What|Removed |Added CC||nyh at math

[Bug c++/59211] New: init_priority doesn't work with constant expressions

2013-11-20 Thread nyh at math dot technion.ac.il
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nyh at math dot technion.ac.il It seems that __attribute__((init_priority(...))) demands an integer constant, and doesn't work with constant *expressions*. For example, the following doesn't compile: constexpr int prio

[Bug c++/59211] init_priority doesn't work with constant expressions

2013-11-20 Thread nyh at math dot technion.ac.il
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59211 --- Comment #2 from Nadav Har'El nyh at math dot technion.ac.il --- Amazing, this workaround indeed works :-) Thanks! With the constexpr prio, indeed using prio+0 solved the problem. For the enum class, prio::second, I can't use addition

[Bug libstdc++/55841] New: Unexpected behavior from STL's queue

2013-01-01 Thread nyh at math dot technion.ac.il
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55841 Bug #: 55841 Summary: Unexpected behavior from STL's queue Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal

[Bug c++/50776] New: unused object optimized out, despite having constructor

2011-10-18 Thread nyh at math dot technion.ac.il
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50776 Bug #: 50776 Summary: unused object optimized out, despite having constructor Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED

[Bug c++/50776] unused object optimized out, despite having constructor

2011-10-18 Thread nyh at math dot technion.ac.il
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50776 Nadav Har'El nyh at math dot technion.ac.il changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED