Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix issue #4046 Seg fault in config_files() #4052

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

Merged
merged 1 commit into from Dec 30, 2016
Merged

Fix issue #4046 Seg fault in config_files() #4052

merged 1 commit into from Dec 30, 2016

Conversation

ghost
Copy link

@ghost ghost commented Dec 29, 2016

According to the comments in the config.h file, git_config_get_string() needs a config snapshot. Added call to git_repository_config_snapshot() to get this snapshot.

Added a "repo" parameter to config_files(), which is used by git_repository_config_snapshot().

I also tested (but did not commit) having git_config_get_int32() use the config snapshot. This worked, and if implemented could eliminate the "repo_path" parameter to config_files().

@ghost
Copy link
Author

ghost commented Dec 30, 2016

It looks like the Travis CI Build Job #9100.3 failed with a segmentation fault in libgit2_clar. I enclose the relevant lines from the log.

1: threads::basic....
1: threads::diff..
1/4 Test #1: libgit2_clar .............................***Exception: SegFault 37.42 sec
test 2

My commit changed only one file -- examples/generate.c, and I'm fairly sure that libgit2_clar doesn't run the examples/generate executable. I also noticed that other Trravis CI Build Jobs for this Pull Request were successful, e.g. #9100.2, where this area of its log looks like

1: threads::basic...S
1: threads::diff..
1: threads::iterator.
1: threads::refdb.
1: trace::traceSSSSSS
1: trace::windows::stacktrace...
1: transport::register....
1: win32::forbidden..........
1: win32::longpath.
1:
1/4 Test #1: libgit2_clar ............................. Passed 41.60 sec
test 2

I noticed that Pull Request #4051, which was submitted about an hour before mine, has an identical failure for Build Job #9099.8.

Could this segmentation fault be an intermittent bug? Is there perhaps a way to bypass this test so Pull Requests can be processes?

@ethomson
Copy link
Member

Thanks! 😀

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 this pull request may close these issues.

1 participant