https://bugs.kde.org/show_bug.cgi?id=436413
Mark Wielaard changed:
What|Removed |Added
Resolution|--- |FIXED
Status|CONFIRMED
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #21 from Mark Wielaard ---
Looks good to me.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=436413
Paul Floyd changed:
What|Removed |Added
Attachment #155629|0 |1
is obsolete|
https://bugs.kde.org/show_bug.cgi?id=436413
Paul Floyd changed:
What|Removed |Added
Attachment #155567|0 |1
is obsolete|
https://bugs.kde.org/show_bug.cgi?id=436413
Paul Floyd changed:
What|Removed |Added
Attachment #155503|0 |1
is obsolete|
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #19 from Paul Floyd ---
Created attachment 155629
--> https://bugs.kde.org/attachment.cgi?id=155629=edit
Move arg to replacemalloc_core
I think that this is cleaner now.
--
You are receiving this mail because:
You are watching all bug
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #18 from Paul Floyd ---
(In reply to Mark Wielaard from comment #15)
> ...checking header files and include directives
> *** File coregrind/m_replacemalloc/vg_replace_malloc.c must not include
> pub_tool_options.h
>
> Only core headers are
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #17 from Paul Floyd ---
(In reply to Mark Wielaard from comment #16)
> This part seems unrelated
Yes, i must have forgotten that I'd switched branches. I just pushed this bit
to master and will update the patch.
--
You are receiving
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #16 from Mark Wielaard ---
diff --git a/coregrind/m_syswrap/syswrap-freebsd.c
b/coregrind/m_syswrap/syswrap-freebsd.c
index 401a7ba8e..13d3b6bf2 100644
--- a/coregrind/m_syswrap/syswrap-freebsd.c
+++ b/coregrind/m_syswrap/syswrap-freebsd.c
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #15 from Mark Wielaard ---
...checking header files and include directives
*** File coregrind/m_replacemalloc/vg_replace_malloc.c must not include
pub_tool_options.h
Only core headers are allowed in non-tool source files.
I assume this is
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #14 from Paul Floyd ---
Created attachment 155567
--> https://bugs.kde.org/attachment.cgi?id=155567=edit
Try again
With the right patch file this time hopefully.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=436413
Mark Wielaard changed:
What|Removed |Added
Attachment #155510|0 |1
is obsolete|
https://bugs.kde.org/show_bug.cgi?id=436413
Mark Wielaard changed:
What|Removed |Added
Attachment #155503|1 |0
is obsolete|
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #13 from Paul Floyd ---
> This looks like the patch from bug #452802 (which has already been applied).
Bah!
The previous version was (almost) OK.
--
You are receiving this mail because:
You are watching all bug changes.
https://bugs.kde.org/show_bug.cgi?id=436413
Mark Wielaard changed:
What|Removed |Added
Status|REPORTED|CONFIRMED
Ever confirmed|0
https://bugs.kde.org/show_bug.cgi?id=436413
Sam James changed:
What|Removed |Added
CC||s...@gentoo.org
--
You are receiving this mail
https://bugs.kde.org/show_bug.cgi?id=436413
Paul Floyd changed:
What|Removed |Added
Attachment #155503|0 |1
is obsolete|
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #10 from Paul Floyd ---
memcheck/tests/Makefile.am:1: error: realloc_size_zero_mismatch.stdout.exp is
missing in EXTRA_DIST
memcheck/tests/Makefile.am:1: error: realloc_size_zero_mismatch.vgtest is
missing in EXTRA_DIST
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #9 from Paul Floyd ---
Created attachment 155503
--> https://bugs.kde.org/attachment.cgi?id=155503=edit
warn about realloc zero
OK here it is. A big patch.
Now warns about realloc 0. Two new options, one core to switch between glibc
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #8 from Paul Floyd ---
I've done as much testing as I can (with a slight exception for musl where I
just looked at the source).
Universally, if ptr is 0 then the call behaves like malloc. My initial feeling
is that we shouldn't warn in
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #7 from Paul Floyd ---
The wording is getting a bit tougher in C2X
If ptr is a null pointer, the realloc function behaves like the malloc function
for the specified size.
Otherwise, if ptr does not match a pointer earlier returned by a
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #6 from Paul Floyd ---
The precise wording of the C17 standard is [7.22.3.5 The realloc function para
3]
If size is zero and memory for the new object is not allocated, it is
implementation-defined whether the old object is deallocated. If
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #5 from Paul Floyd ---
I'm getting close to having a patch for this. I need to check that all tools
work OK and also check that suppressions work.
I'll try on-by default to begin with.
This will print both the realloc==free context and
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #4 from Paul Floyd ---
I've been thinking about this. I don't think that there is a quick fix. Some of
this may also apply to alligned alloc functions that I've also been thinking
about.
What needs doing?
First a new option
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #3 from Mark Wielaard ---
Another interesting corner case is malloc (0), this is also implementation
defined. It might either return a NULL pointer or an unique pointer (that needs
to be freed). Currently valgrind doesn't warn about this,
https://bugs.kde.org/show_bug.cgi?id=436413
--- Comment #2 from Mark Wielaard ---
We cannot tell pre-C11 code from C11 code, but realloc with size zero has
always been problematic because the the behavior has been implementation
defined and different implementations decided to implement it
https://bugs.kde.org/show_bug.cgi?id=436413
Paul Floyd changed:
What|Removed |Added
CC||pjfl...@wanadoo.fr
--- Comment #1 from Paul Floyd
27 matches
Mail list logo