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

argument 1 value ‘18446744073709551611’ exceeds maximum object size 9223372036854775807 #521

Closed
fhoedemakers opened this issue Apr 23, 2024 · 1 comment · Fixed by #522

Comments

@fhoedemakers
Copy link

I just cloned the latest version and built the toolchain from source build-toolchain.sh in the tools folder. This ran correctly.
The N64_INST var is set to ~/libdragon.

When running build.sh from the tools folder i get the error:

dumpdfs/dumpdfs.c: In function ‘main’:
dumpdfs/dumpdfs.c:801:29: error: argument 1 value ‘18446744073709551611’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
  801 |             uint8_t *data = malloc( (size_t)dfs_size( fl ) );
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dumpdfs/dumpdfs.c:4:
/usr/include/stdlib.h:539:14: note: in a call to allocation function ‘malloc’ declared here
  539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
      |              ^~~~~~
dumpdfs/dumpdfs.c:837:29: error: argument 1 value ‘18446744073709551611’ exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
  837 |             uint8_t *data = malloc( (size_t)dfs_size( fl ) );
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from dumpdfs/dumpdfs.c:4:
/usr/include/stdlib.h:539:14: note: in a call to allocation function ‘malloc’ declared here
  539 | extern void *malloc (size_t __size) __THROW __attribute_malloc__
      |              ^~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:11: dumpdfs/dumpdfs.o] Error 1
make[1]: *** Waiting for unfinished jobs....

I'm using the latest version of WSL.

The older version of libdragon which i built from source just a couple of weeks ago had no issue running build.sh

@rasky
Copy link
Collaborator

rasky commented Apr 23, 2024

Thanks for the report, #522 contains a fix for that

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

Successfully merging a pull request may close this issue.

2 participants