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

New Build warnings following latest changes #426

Closed
philippedistributive opened this issue Sep 5, 2024 · 0 comments · Fixed by #433
Closed

New Build warnings following latest changes #426

philippedistributive opened this issue Sep 5, 2024 · 0 comments · Fixed by #433
Assignees
Milestone

Comments

@philippedistributive
Copy link
Collaborator

philippedistributive commented Sep 5, 2024

Issue type

Bug

How did you install PythonMonkey?

None

OS platform and distribution

No response

Python version (python --version)

No response

PythonMonkey version (pip show pythonmonkey)

No response

Bug Description

Regression introduced by #417: build warnings

/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc: In function ‘bool array_valueOf(JSContext*, unsigned int, JS::Value*)’:
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:44: warning: ‘%d’ directive output truncated writing between 1 and 3 bytes into a region of size 0 [-Wformat-truncation=]
46 | snprintf((char )&buffer[charIndex], 4, "%d", data[0]);
| ^~
/home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:43: note: directive argument in the range [0, 255]
46 | snprintf((char )&buffer[charIndex], 4, "%d", data[0]);
| ^~~~
In file included from /usr/include/stdio.h:980,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/mozilla/Assertions.h:68,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/mozilla/AlreadyAddRefed.h:14,
from /home/philippe/Sources/PythonMonkey/_spidermonkey_install/include/mozjs-130a1/jsapi.h:12,
from /home/philippe/Sources/PythonMonkey/include/PyBaseProxyHandler.hh:14,
from /home/philippe/Sources/PythonMonkey/include/PyObjectProxyHandler.hh:14,
from /home/philippe/Sources/PythonMonkey/include/PyBytesProxyHandler.hh:15,
from /home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:12:
In function ‘int snprintf(char
, size_t, const char
, ...)’,
inlined from ‘bool array_valueOf(JSContext*, unsigned int, JS::Value*)’ at /home/philippe/Sources/PythonMonkey/src/PyBytesProxyHandler.cc:46:11:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:54:35: note: ‘__builtin___snprintf_chk’ output between 2 and 4 bytes into a destination of size 0
54 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~

Standalone code to reproduce the issue

No response

Relevant log output or backtrace

No response

Additional info if applicable

No response

What branch of PythonMonkey were you developing on? (If applicable)

No response

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

Successfully merging a pull request may close this issue.

2 participants