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 on line-num-width & -N #529

Closed
elig0n opened this issue Jun 11, 2024 · 1 comment
Closed

segmentation fault on line-num-width & -N #529

elig0n opened this issue Jun 11, 2024 · 1 comment

Comments

@elig0n
Copy link

elig0n commented Jun 11, 2024

using 1649cc3:

This causes a crash:

LESS="--line-num-width 1" ./less -N README

This only crashes when reaching the end of file:

LESS="--line-num-width 2" ./less -N +G README

Also when passing arguments directly and not using an environment variable.

here's a stack trace:

       Stack trace of thread 285268:
       #0  0x00005637267704a1 step_charc (less + 0xb4a1)
       #1  0x0000563726770514 step_char (less + 0xb514)
       #2  0x000056372677c9f2 store_char (less + 0x179f2)
       #3  0x000056372677db4d pappend_b (less + 0x18b4d)
       #4  0x000056372677affb back_line (less + 0x15ffb)
       #5  0x000056372677b96f jump_forw (less + 0x1696f)
       #6  0x000056372677483e commands (less + 0xf83e)
       #7  0x000056372676b9b0 main (less + 0x69b0)
       #8  0x00007f598ee33cd0 n/a (libc.so.6 + 0x29cd0)
       #9  0x00007f598ee33d8a __libc_start_main (libc.so.6 + 0x29d8a)
       #10 0x000056372676ba55 _start (less + 0x6a55)
       ELF object binary architecture: AMD x86-64

and also this:

          Stack trace of thread 270002:
          #0  0x00005615484c142c pshift_all (less + 0x1742c)
          #1  0x00005615484bfa9f forw_line_seg (less + 0x15a9f)
          #2  0x00005615484bebbb forw (less + 0x14bbb)
          #3  0x00005615484b9436 commands (less + 0xf436)
          #4  0x00005615484b09b0 main (less + 0x69b0)
          #5  0x00007f2e26287cd0 n/a (libc.so.6 + 0x29cd0)
          #6  0x00007f2e26287d8a __libc_start_main (libc.so.6 + 0x29d>
          #7  0x00005615484b0a55 _start (less + 0x6a55)
          ELF object binary architecture: AMD x86-64
gwsw added a commit that referenced this issue Jun 11, 2024
exceeds the value specified by --line-num-width.

Related to #529.
@gwsw
Copy link
Owner

gwsw commented Jun 11, 2024

Thanks, should be fixed in db13e77.

gwsw added a commit that referenced this issue Jun 13, 2024
Bug #529 was introduced after less-643.
@gwsw gwsw closed this as completed Jun 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