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

thread-pthreads.c: memory access issue? #272

Open
jpellegrini opened this issue Nov 8, 2021 · 0 comments
Open

thread-pthreads.c: memory access issue? #272

jpellegrini opened this issue Nov 8, 2021 · 0 comments

Comments

@jpellegrini
Copy link
Contributor

Hi!

gcc complains about __sigsetjmp accessing 200 bytes in a region of size 72 in mutex-pthreads.c (see below).
Is this a problem? If it's not, maybe it's possible to get rid of the warning?

gcc -DHAVE_CONFIG_H -I.       -g -O2  -g -O2 -MT mutex-common.o -MD -MP -MF .deps/mutex-common.Tpo -c -o mutex-common.o mutex-common.c
In file included from stklos.h:51,
                 from thread-pthreads.c:30:
thread-pthreads.c: In function ‘start_scheme_thread’:
thread-pthreads.c:95:3: warning: ‘__sigsetjmp’ accessing 200 bytes in a region of size 72 [-Wstringop-overflow=]
   95 |   pthread_cleanup_push(terminate_scheme_thread, thr);
      |   ^~~~~~~~~~~~~~~~~~~~
thread-pthreads.c:95:3: note: referencing argument 1 of type ‘struct __jmp_buf_tag *’
/usr/include/pthread.h:734:12: note: in a call to function ‘__sigsetjmp’
  734 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
      |            ^~~~~~~~~~~
mv -f .deps/thread-common.Tpo .deps/thread-common.Po
gcc -DHAVE_CONFIG_H -I.       -g -O2  -g -O2 -MT mutex-pthreads.o -MD -MP -MF .deps/mutex-pthreads.Tpo -c -o mutex-pthreads.o mutex-pthreads.c
mv -f .deps/thread-pthreads.Tpo .deps/thread-pthreads.Po
mv -f .deps/mutex-common.Tpo .deps/mutex-common.Po
mv -f .deps/uvector.Tpo .deps/uvector.Po
mv -f .deps/vector.Tpo .deps/vector.Po
mv -f .deps/vport.Tpo .deps/vport.Po
mv -f .deps/system.Tpo .deps/system.Po
In file included from stklos.h:51,
                 from mutex-pthreads.c:28:
mutex-pthreads.c: In function ‘STk_mutex_lock’:
mutex-pthreads.c:150:3: warning: ‘__sigsetjmp’ accessing 200 bytes in a region of size 72 [-Wstringop-overflow=]
  150 |   pthread_cleanup_push((void (*)()) mutex_finalizer, mtx);
      |   ^~~~~~~~~~~~~~~~~~~~
mutex-pthreads.c:150:3: note: referencing argument 1 of type ‘struct __jmp_buf_tag *’
/usr/include/pthread.h:734:12: note: in a call to function ‘__sigsetjmp’
  734 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
      |            ^~~~~~~~~~~
mutex-pthreads.c: In function ‘STk_mutex_unlock’:
mutex-pthreads.c:220:3: warning: ‘__sigsetjmp’ accessing 200 bytes in a region of size 72 [-Wstringop-overflow=]
  220 |   pthread_cleanup_push((void (*)()) mutex_finalizer, mtx);
      |   ^~~~~~~~~~~~~~~~~~~~
mutex-pthreads.c:220:3: note: referencing argument 1 of type ‘struct __jmp_buf_tag *’
/usr/include/pthread.h:734:12: note: in a call to function ‘__sigsetjmp’
  734 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
      |            ^~~~~~~~~~~
mv -f .deps/mutex-pthreads.Tpo .deps/mutex-pthreads.Po
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

1 participant