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 files are deleted #404

Closed
gwsw opened this issue Jul 18, 2023 · 2 comments
Closed

Segmentation fault when files are deleted #404

gwsw opened this issue Jul 18, 2023 · 2 comments

Comments

@gwsw
Copy link
Owner

gwsw commented Jul 18, 2023

(Reposting report that was submitted via email.)

I have experienced a 'Segmentation fault' in less 633 when 3 or more of the files being viewed are deleted by other process and I try to view one of the deleted files with the command ':p'. For example:

less foo a b c
:n (shows a)
:n (shows b)
:n (shows c)
(here somebody else deletes files a, b, and c)
:p (b: No such file or directory (press RETURN))
(I press RETURN)
:p (c: No such file or directory (press RETURN))
(I press RETURN)
:p (a: No such file or directory (press RETURN))
(I press RETURN)
Segmentation fault

I attach a valgrind log. It seems that del_ifile (ifile.c:146) does not remove all the references to the IFILE it frees, and some stale pointer is used later to access and free again the same IFILE. The next and prev pointers saved in reedit_ifile (edit.c:872) might be the cause, I'm not sure.

@gwsw
Copy link
Owner Author

gwsw commented Jul 18, 2023

less-633-segfault.log

@gwsw
Copy link
Owner Author

gwsw commented Aug 26, 2023

Fixed in 6446450.

@gwsw gwsw closed this as completed Aug 26, 2023
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