You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2012/07/12 05:46:34 UTC
[jira] [Created] (TS-1345) fix signed/unsigned compilation issues
in Vec
James Peach created TS-1345:
-------------------------------
Summary: fix signed/unsigned compilation issues in Vec
Key: TS-1345
URL: https://issues.apache.org/jira/browse/TS-1345
Project: Traffic Server
Issue Type: Improvement
Components: Cleanup, Core
Affects Versions: 3.3.0
Reporter: James Peach
Assignee: James Peach
Fix For: 3.3.0
cc1plus: warnings being treated as errors
Vec.h: In function ‘int main(int, char**)’:
Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
Alan says:
It is a result of optimization in the call sequence in test_append that calls str.append(value,len) which calls reserve(length() + count). length() is inlined to a reference to n so the argument is treated as "n+count". This yields, in the reserve method at the bad line
if (n+count <= n)
which leads to the warning/error you see. I don't see how to disable the error, though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TS-1345) fix signed/unsigned compilation issues
in Vec
Posted by "James Peach (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412485#comment-13412485 ]
James Peach commented on TS-1345:
---------------------------------
This is a build failure with gcc >= 4.6 or thereabouts. gcc is complaining because signed integer overflow is undefined and it chooses to assume that it can't happen. The fix is to switch Vec.h to use unsigned types where it makes sense.
> fix signed/unsigned compilation issues in Vec
> ---------------------------------------------
>
> Key: TS-1345
> URL: https://issues.apache.org/jira/browse/TS-1345
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cleanup, Core
> Affects Versions: 3.3.0
> Reporter: James Peach
> Assignee: James Peach
> Fix For: 3.3.0
>
>
> cc1plus: warnings being treated as errors
> Vec.h: In function ‘int main(int, char**)’:
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Alan says:
> It is a result of optimization in the call sequence in test_append that calls str.append(value,len) which calls reserve(length() + count). length() is inlined to a reference to n so the argument is treated as "n+count". This yields, in the reserve method at the bad line
> if (n+count <= n)
> which leads to the warning/error you see. I don't see how to disable the error, though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TS-1345) fix signed/unsigned compilation issues
in Vec
Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Galić updated TS-1345:
---------------------------
Backport to Version: 3.2.3 (was: 3.2.1)
> fix signed/unsigned compilation issues in Vec
> ---------------------------------------------
>
> Key: TS-1345
> URL: https://issues.apache.org/jira/browse/TS-1345
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cleanup, Core
> Affects Versions: 3.3.0
> Reporter: James Peach
> Assignee: James Peach
> Fix For: 3.3.0
>
>
> cc1plus: warnings being treated as errors
> Vec.h: In function ‘int main(int, char**)’:
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Alan says:
> It is a result of optimization in the call sequence in test_append that calls str.append(value,len) which calls reserve(length() + count). length() is inlined to a reference to n so the argument is treated as "n+count". This yields, in the reserve method at the bad line
> if (n+count <= n)
> which leads to the warning/error you see. I don't see how to disable the error, though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TS-1345) fix signed/unsigned compilation issues
in Vec
Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Galić updated TS-1345:
---------------------------
Backport to Version: (was: 3.2.3)
> fix signed/unsigned compilation issues in Vec
> ---------------------------------------------
>
> Key: TS-1345
> URL: https://issues.apache.org/jira/browse/TS-1345
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cleanup, Core
> Affects Versions: 3.3.0
> Reporter: James Peach
> Assignee: James Peach
> Fix For: 3.3.0
>
>
> cc1plus: warnings being treated as errors
> Vec.h: In function ‘int main(int, char**)’:
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Alan says:
> It is a result of optimization in the call sequence in test_append that calls str.append(value,len) which calls reserve(length() + count). length() is inlined to a reference to n so the argument is treated as "n+count". This yields, in the reserve method at the bad line
> if (n+count <= n)
> which leads to the warning/error you see. I don't see how to disable the error, though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TS-1345) fix signed/unsigned compilation issues
in Vec
Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Galić updated TS-1345:
---------------------------
Backport to Version: 3.2.1
> fix signed/unsigned compilation issues in Vec
> ---------------------------------------------
>
> Key: TS-1345
> URL: https://issues.apache.org/jira/browse/TS-1345
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cleanup, Core
> Affects Versions: 3.3.0
> Reporter: James Peach
> Assignee: James Peach
> Fix For: 3.3.0
>
>
> cc1plus: warnings being treated as errors
> Vec.h: In function ‘int main(int, char**)’:
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Alan says:
> It is a result of optimization in the call sequence in test_append that calls str.append(value,len) which calls reserve(length() + count). length() is inlined to a reference to n so the argument is treated as "n+count". This yields, in the reserve method at the bad line
> if (n+count <= n)
> which leads to the warning/error you see. I don't see how to disable the error, though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (TS-1345) fix signed/unsigned compilation issues
in Vec
Posted by "James Peach (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TS-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Peach resolved TS-1345.
-----------------------------
Resolution: Fixed
8ab44ed TS-1345: fix signed/unsigned compilation issues in Vec
> fix signed/unsigned compilation issues in Vec
> ---------------------------------------------
>
> Key: TS-1345
> URL: https://issues.apache.org/jira/browse/TS-1345
> Project: Traffic Server
> Issue Type: Improvement
> Components: Cleanup, Core
> Affects Versions: 3.3.0
> Reporter: James Peach
> Assignee: James Peach
> Fix For: 3.3.0
>
>
> cc1plus: warnings being treated as errors
> Vec.h: In function ‘int main(int, char**)’:
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Vec.h:616: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
> Alan says:
> It is a result of optimization in the call sequence in test_append that calls str.append(value,len) which calls reserve(length() + count). length() is inlined to a reference to n so the argument is treated as "n+count". This yields, in the reserve method at the bad line
> if (n+count <= n)
> which leads to the warning/error you see. I don't see how to disable the error, though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira