Skip to content

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

Merged
ethomson merged 1 commit into
masterfrom
unknown repository
Dec 30, 2016
Merged

Fix issue #4046 Seg fault in config_files()#4052
ethomson merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Dec 29, 2016

Copy link
Copy Markdown

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

ghost commented Dec 30, 2016

Copy link
Copy Markdown
Author

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
Copy Markdown
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