Skip to content
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

Build failed when in o2 optimize level: 'strcat' accessing xxx or more bytes at offsets xxx and xxx may overlap 1 byte at offset xxx #145

Open
qingwa2009 opened this issue Sep 28, 2024 · 2 comments

Comments

@qingwa2009
Copy link

D:/desktop/libpeer/examples/esp32/managed_components/sepfy__libpeer/src/peer_connection.c
In function 'peer_connection_state_new',
inlined from 'peer_connection_loop' at D:/desktop/libpeer/examples/esp32/managed_components/sepfy__libpe eer/src/peer_connection.c:367:9:
D:/desktop/libpeer/examples/esp32/managed_components/sepfy__libpeer/src/peer_connection.c:309:5: error: 'strcat' accessing 20497 or more bytes at offsets 10780 and 31276 may overlap 1 byte at offset 31276 [ -Werror=restrict]
309 | strcat(pc->local_sdp.content, description);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/desktop/libpeer/examples/esp32/managed_components/sepfy__libpeer/src/peer_connection.c:320:7: error: 'strcat' accessing 20497 or more bytes at offsets 10780 and 31276 may overlap 1 byte at offset 31276 [ -Werror=restrict]
320 | strcat(pc->local_sdp.content, description);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/desktop/libpeer/examples/esp32/managed_components/sepfy__libpeer/src/peer_connection.c:328:7: error: 'strcat' accessing 20497 or more bytes at offsets 10780 and 31276 may overlap 1 byte at offset 31276 [ -Werror=restrict]
328 | strcat(pc->local_sdp.content, description);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/desktop/libpeer/examples/esp32/managed_components/sepfy__libpeer/src/peer_connection.c:335:7: error: 'strcat' accessing 20497 or more bytes at offsets 10780 and 31276 may overlap 1 byte at offset 31276 [ -Werror=restrict]
335 | strcat(pc->local_sdp.content, description);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/desktop/libpeer/examples/esp32/managed_components/sepfy__libpeer/src/peer_connection.c:345:5: error: 'strcat' accessing 20497 or more bytes at offsets 10780 and 31276 may overlap 1 byte at offset 31276 [ -Werror=restrict]
345 | strcat(pc->local_sdp.content, description);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1.exe: some warnings being treated as errors

@sepfy
Copy link
Owner

sepfy commented Oct 10, 2024

Can you provide more details about your compilation environment? Includes IDF version. Because I haven't encountered this problem.

@qingwa2009
Copy link
Author

qingwa2009 commented Oct 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants