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

segmentation fault when no arguments are given #157

Closed
hackerb9 opened this issue Jan 8, 2025 · 2 comments · Fixed by #160
Closed

segmentation fault when no arguments are given #157

hackerb9 opened this issue Jan 8, 2025 · 2 comments · Fixed by #160

Comments

@hackerb9
Copy link
Collaborator

hackerb9 commented Jan 8, 2025

@quartzjer did you accidentally merge a rejected patch into the main branch?

$ ./xclip
Segmentation fault (core dumped)
$ gdb ./xclip
Reading symbols from ./xclip...
(gdb) run
Starting program: /src/xclip/xclip 
Program received signal SIGSEGV, Segmentation fault.
__strcmp_evex () at ../sysdeps/x86_64/multiarch/strcmp-evex.S:314
(gdb) bt
#0  __strcmp_evex () at ../sysdeps/x86_64/multiarch/strcmp-evex.S:314
#1  0x00005555555568ec in doOptMain (argc=1, argv=0x7fffffffe4d8) at xclip.c:183
#2  main (argc=1, argv=0x7fffffffe4d8) at xclip.c:976
(gdb) up
#1  0x00005555555568ec in doOptMain (argc=1, argv=0x7fffffffe4d8) at xclip.c:183
183         if (!strcmp(argv[1], "--help"))
(gdb) quit
$ git blame xclip.c | grep 183
ea29b6be (Edward Betts   2017-11-19 16:19:00 +0000  183)     if (!strcmp(argv[1], "--help"))
$ git blame --first-parent xclip.c | grep 183
149e41b9 (Jer Miller 2024-12-27 10:50:29 -0700  183)     if (!strcmp(argv[1], "--help"))
@quartzjer
Copy link
Collaborator

Indeed, doh!

@quartzjer
Copy link
Collaborator

Just fixed it in #160 👍

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