: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63
--- Comment #2 from Paul Dreik ---
The fmt lib had the same problem. I wrote a safe duration cast which eventually
morphed into this:
https://github.com/fmtlib/fmt/blob/9b74160817f2bc63288d2111e823a35dd3dbf234/include/fmt/chrono.h#L57-L68
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
Target Milestone: ---
The following program:
#include
#include
int main() {
[[maybe_unused]] auto blah = std::format(
&q
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
Target Milestone: ---
The following program:
#include
#include
#include
int main() {
std::istringstream is("21474837");
std::chrono::minutes
ty: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
Target Milestone: ---
The following program:
#include
constexpr auto blah = std::format(L"{:65536}", 1);
is problematic when com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110860
--- Comment #19 from Paul Dreik ---
Thanks Jonathan!
I am happy to count myself as a gcc contributor now :-D
Never mind the tiny git mistake, that will be forgotten once gcc 14 is out!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110860
--- Comment #12 from Paul Dreik ---
The last fix is unfortunately not sufficient either, because for abs(__v)<1
log10 becomes negative and that wont convert gracefully to size_t.
I implemented the following fix, which avoids log10 and uses frex
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110860
--- Comment #8 from Paul Dreik ---
I do unfortunately not think the fix is entirely correct.
When 0 is passed, log10 returns -inf, which can not be converted to an integer.
I had a bit of problem to reproduce this with gcc, but it worked with
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110974
--- Comment #1 from Paul Dreik ---
This is very similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110862
which has already been fixed on trunk.
ty: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
Target Milestone: ---
The following code:
#include
#include
#include
int main() {
double v = 0;
// use a char buffer instead of
iority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
Target Milestone: ---
The following program:
#include
#include
int main() {
float v = -1;
std::puts(std::vformat("{:05L}", std::make_format_args(v)).c_str
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110862
--- Comment #2 from Paul Dreik ---
(In reply to 康桓瑋 from comment #1)
> It does throw:
>
> https://godbolt.org/z/5q3bb51YE
Sorry for being unclear. Yes, it throws but that is after the out of bounds
read has happened.
iority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
Target Milestone: ---
The following program with an incorrect format string causes an out of bounds
read when compiled with gcc 13.2:
#include
#include
int main() {
unsi
iority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at pauldreik dot se
Target Milestone: ---
The following program, compiled with gcc 13.2:
#include
#include
int main() {
std::puts(std::format("{:f}",2e304).c_str());
}
causes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67631
--- Comment #3 from Paul Dreik ---
This is still present in trunk, rev 242335
g++-trunk (GCC) 7.0.0 20161112 (experimental)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67631
Paul Dreik changed:
What|Removed |Added
CC||gcc at pauldreik dot se
--- Comment #2
16 matches
Mail list logo