mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #2233] 2 -Wsizeof-pointer-memaccess clang warnings in --enable-memdbg debug build #1493
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1493
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @frank-dittrich on GitHub (Aug 24, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2233
@jfoug commented on GitHub (Aug 24, 2016):
Stupid ass warning. Just because the compiler writer 'expects' something does not mean crap!
Hopefully an easy fix however. Just put MEMDBG_HDR * into the sizeof, vs the variable name itself.
@jfoug commented on GitHub (Aug 24, 2016):
If the compiler is going to make wild ass guesses about behavior like this, then it should be smart enough to see that we are not copying what p points to, but copying the ADDRESS of the pointer p. Oh well.
@jfoug commented on GitHub (Aug 24, 2016):
Ok, I have clang installed on my fedora22, and it is coring, so I can now hopefully better debug this damn issue.
@frank-dittrich commented on GitHub (Aug 24, 2016):
No luck.
File a clang bug? gcc also has that warning in -Wall, but is smart enough not to warn here.
@jfoug commented on GitHub (Aug 24, 2016):
This is 100% a clang bug. The code is (and was) correct. What it is doing is putting a the 'location' of a pointer into a known spot in memory, since the pointer distance from the front of the allocated block can vary. We have to work 'backwards' from the pointer the program has, to be able to find the REAL memory block that was allocated, since call the 'program' has is a pointer to some memory within that allocated buffer.
This was not a bug, even though clang 'thinks' it is strange behavior. I was hopeful that changing to the actual 'type' within the sizeof would have muted it, but I guess not.
@jfoug commented on GitHub (Aug 24, 2016):
I am not pushing any change, if there was not muting of the warning.
@kholia commented on GitHub (Mar 8, 2017):
@magnumripper Should we close bugs (like this one for example) which need no further action or where there is no further step that can be taken?
@magnumripper commented on GitHub (Mar 8, 2017):
Yeah I think so.
@ghost commented on GitHub (Apr 24, 2017):
Isn't this the "fix"? I mean, now the destination pointer is only a pointer; a 'generic' one?
I had to apply this to CI (and all is ok) .