-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Remove OSSL_CRYPTO_ALLOC attribute from CRYPTO_*dup routines #28220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The __attribute__((malloc)) is for functions that return new memory, and "the memory [returned by the function] has undefined content", which is a property that doesn't hold for the *dup functions (the same reason it doesn't apply to realloc). Fixes: e103595 "OSSL_CRYPTO_ALLOC attribute introduction proposal." Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
0f7c890
to
230d53f
Compare
Would the |
Yes, I'd like to introduce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A separate PR is fine.
This pull request is ready to merge |
The __attribute__((malloc)) is for functions that return new memory, and "the memory [returned by the function] has undefined content", which is a property that doesn't hold for the *dup functions (the same reason it doesn't apply to realloc). Fixes: e103595 "OSSL_CRYPTO_ALLOC attribute introduction proposal." Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from #28220)
The __attribute__((malloc)) is for functions that return new memory, and "the memory [returned by the function] has undefined content", which is a property that doesn't hold for the *dup functions (the same reason it doesn't apply to realloc). Fixes: e103595 "OSSL_CRYPTO_ALLOC attribute introduction proposal." Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from #28220) (cherry picked from commit 85bba74)
The __attribute__((malloc)) is for functions that return new memory, and "the memory [returned by the function] has undefined content", which is a property that doesn't hold for the *dup functions (the same reason it doesn't apply to realloc). Fixes: e103595 "OSSL_CRYPTO_ALLOC attribute introduction proposal." Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from #28220) (cherry picked from commit 85bba74)
The __attribute__((malloc)) is for functions that return new memory, and "the memory [returned by the function] has undefined content", which is a property that doesn't hold for the *dup functions (the same reason it doesn't apply to realloc). Fixes: e103595 "OSSL_CRYPTO_ALLOC attribute introduction proposal." Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from #28220) (cherry picked from commit 85bba74)
merged to master, 3.5, 3.4, 3.3 and 3.2 |
The __attribute__((malloc)) is for functions that return new memory, and "the memory [returned by the function] has undefined content", which is a property that doesn't hold for the *dup functions (the same reason it doesn't apply to realloc). Fixes: e103595 "OSSL_CRYPTO_ALLOC attribute introduction proposal." Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from #28220) (cherry picked from commit 85bba74)
The
__attribute__((malloc))
is for functions that return new memory, and "the memory [returned by the function] has undefined content", which is a property that doesn't hold for the*dup
functions (the same reason it doesn't apply torealloc
).Fixes: e103595 "OSSL_CRYPTO_ALLOC attribute introduction proposal."