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

Errors on Arch #4

Closed
neauoire opened this issue Apr 9, 2024 · 1 comment
Closed

Errors on Arch #4

neauoire opened this issue Apr 9, 2024 · 1 comment
Assignees

Comments

@neauoire
Copy link

neauoire commented Apr 9, 2024

/home/neauoire/Git/Joy/gc.c: In function ‘GC_realloc’:
/home/neauoire/Git/Joy/gc.c:369:27: error: pointer ‘old’ may be used after ‘realloc’ [-Werror=use-after-free]
  369 |         remind(ptr, size, forget(old));
      |                           ^~~~~~~~~~~
/home/neauoire/Git/Joy/gc.c:364:16: note: call to ‘realloc’ here
  364 |     if ((ptr = realloc(old, size)) == 0)
      |                ^~~~~~~~~~~~~~~~~~
In file included from /home/neauoire/Git/Joy/gc.c:26:
In function ‘forget’,
    inlined from ‘GC_realloc’ at /home/neauoire/Git/Joy/gc.c:369:20:
/home/neauoire/Git/Joy/khash.h:507:28: error: pointer ‘old’ may be used after ‘realloc’ [-Werror=use-after-free]
  507 | #define kh_get(name, h, k) kh_get_##name(h, k)
      |                            ^~~~~~~~~~~~~~~~~~~
/home/neauoire/Git/Joy/gc.c:348:16: note: in expansion of macro ‘kh_get’
  348 |     if ((key = kh_get(Backup, MEM, (uint64_t)ptr)) != kh_end(MEM)) {
      |                ^~~~~~
/home/neauoire/Git/Joy/gc.c: In function ‘GC_realloc’:
/home/neauoire/Git/Joy/gc.c:364:16: note: call to ‘realloc’ here
  364 |     if ((ptr = realloc(old, size)) == 0)
      |                ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/joy.dir/build.make:202: CMakeFiles/joy.dir/gc.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/joy.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Wodan58 added a commit that referenced this issue Apr 10, 2024
@Wodan58
Copy link
Owner

Wodan58 commented Apr 10, 2024

Thanks. The issue may have been solved with a patch to gc.c and will be closed next Tuesday.

@Wodan58 Wodan58 closed this as completed Apr 16, 2024
@Wodan58 Wodan58 self-assigned this Apr 17, 2024
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