-
Notifications
You must be signed in to change notification settings - Fork 1.1k
configure: force 'char' type to be signed #4025
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On some systems, the 'char' type is interpreted as an unsigned char. This may cause some issues as Gluster code assumes that 'char' is signed. This patch adds the '-fsigned-char' option during compilation to make sure it works as expected. Updates: gluster#1000 Signed-off-by: Xavi Hernandez <[email protected]>
/run regression |
amarts
approved these changes
Mar 2, 2023
amarts
pushed a commit
to kadalu/glusterfs
that referenced
this pull request
Mar 20, 2023
On some systems, the 'char' type is interpreted as an unsigned char. This may cause some issues as Gluster code assumes that 'char' is signed. This patch adds the '-fsigned-char' option during compilation to make sure it works as expected. Updates: gluster#1000 Signed-off-by: Xavi Hernandez <[email protected]>
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Mar 9, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/cluster/afr/src/afr-inode-write.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variabl "byte" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Mar 9, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/cluster/afr/src/afr-inode-write.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "byte" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Mar 9, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/cluster/afr/src/afr-inode-write.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "byte" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Mar 9, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/features/compress/src/cdc-helper.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "gzip_header" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Jun 10, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/cluster/afr/src/afr-inode-write.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "byte" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]> # xlators/cluster/afr/src/afr-inode-write.c | 2 +- # 1 file changed, 1 insertion(+), 1 deletion(-)
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Jun 10, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/features/compress/src/cdc-helper.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "gzip_header" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]> # xlators/features/compress/src/cdc-helper.c | 4 ++-- # 1 file changed, 2 insertions(+), 2 deletions(-)
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Jun 10, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/cluster/afr/src/afr-inode-write.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "byte" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]> # xlators/cluster/afr/src/afr-inode-write.c | 2 +- # 1 file changed, 1 insertion(+), 1 deletion(-) # xlators/cluster/afr/src/afr-inode-write.c | 2 +- # 1 file changed, 1 insertion(+), 1 deletion(-)
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Jun 10, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/features/compress/src/cdc-helper.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "gzip_header" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]> # xlators/features/compress/src/cdc-helper.c | 4 ++-- # 1 file changed, 2 insertions(+), 2 deletions(-) # xlators/features/compress/src/cdc-helper.c | 4 ++-- # 1 file changed, 2 insertions(+), 2 deletions(-)
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Jun 30, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/cluster/afr/src/afr-inode-write.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "byte" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]> # xlators/cluster/afr/src/afr-inode-write.c | 2 +- # 1 file changed, 1 insertion(+), 1 deletion(-) # xlators/cluster/afr/src/afr-inode-write.c | 2 +- # 1 file changed, 1 insertion(+), 1 deletion(-) # xlators/cluster/afr/src/afr-inode-write.c | 2 +- # 1 file changed, 1 insertion(+), 1 deletion(-)
ThalesBarretto
added a commit
to ThalesBarretto/glusterfs
that referenced
this pull request
Jun 30, 2025
The forcing of signed char type was introduced by 3fb3bb5d38r, "configure: force 'char' type to be signed (gluster#4025)". Thus at xlators/features/compress/src/cdc-helper.c was found the use of a char type to represent bytes, when it should be using an unsigned type to avoid sign extension and overflow. This commit changes the variable "gzip_header" to "unsigned" type. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]> # xlators/features/compress/src/cdc-helper.c | 4 ++-- # 1 file changed, 2 insertions(+), 2 deletions(-) # xlators/features/compress/src/cdc-helper.c | 4 ++-- # 1 file changed, 2 insertions(+), 2 deletions(-) # xlators/features/compress/src/cdc-helper.c | 4 ++-- # 1 file changed, 2 insertions(+), 2 deletions(-)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On some systems, the 'char' type is interpreted as an unsigned char. This may cause some issues as Gluster code assumes that 'char' is signed.
This patch adds the '-fsigned-char' option during compilation to make sure it works as expected.
Updates: #1000