Skip to content

config: add test showing error in Config::from_str() usage - #1226

Open
DanielEScherzer wants to merge 1 commit into
rust-lang:mainfrom
DanielEScherzer:cfg_from_str_borken
Open

DanielEScherzer wants to merge 1 commit into
rust-lang:mainfrom
DanielEScherzer:cfg_from_str_borken

Conversation

@DanielEScherzer

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot rustbot added the S-waiting-on-review Status: Waiting on review label Mar 12, 2026
@DanielEScherzer

Copy link
Copy Markdown
Contributor Author

@rustbot label +bug "help wanted"
This was intended to show that the code from #1225 has some problem somewhere - I spent a few hours trying to debug it and came up empty, some uses of the config work fine and others result in tcache_thread_shutdown(): unaligned tcache chunk detected
@ehuss should #1225 be reverted for now?

@ehuss

ehuss commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Yea, let's go ahead and revert. Looking more closely, git_config_backend_from_string is part of the "sys" API which I do not believe is intended to be part of the public API.

I think I see what's causing the memory corruption, so I'll file an issue with libgit2. But since it is an internal API, we probably shouldn't be exposing it here.

@rustbot

This comment has been minimized.

@DanielEScherzer

Copy link
Copy Markdown
Contributor Author

I think I see what's causing the memory corruption, so I'll file an issue with libgit2

Would appreciate a link to that, I wasn't able to figure out the cause

@ehuss

ehuss commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Here's the upstream issue: libgit2/libgit2#7219

@DanielEScherzer

DanielEScherzer commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@rustbot label "-help wanted" -S-waiting-on-review +S-blocked +upstream

Lets wait until the upstream issue is resolved, and then I'll investigate trying to re-add the ::from_str() method

@rustbot

rustbot commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Error: Parsing relabel command in comment failed: ...' label -' | error: quote in word at >| '"help want'...

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@rustbot rustbot added S-blocked Status: Marked as blocked on further work upstream An upstream issue with libgit2 and removed S-waiting-on-review Status: Waiting on review help wanted labels Mar 13, 2026
@weihanglo

Copy link
Copy Markdown
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting on PR author and removed S-blocked Status: Marked as blocked on further work labels Oct 15, 2026
@rustbot

rustbot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot

rustbot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #1318) made this pull request unmergeable. Please resolve the merge conflicts.

weihanglo pushed a commit to weihanglo/git2-rs that referenced this pull request Oct 19, 2026
This reverts commit 58d206c.

Now that the libgit2 version has been updated (rust-lang#1242) the upstream fix
(libgit2/libgit2#7232) is incorporated and this should work again. A follow-up
commit will expand the tests, including the case from rust-lang#1226 that failed after
the first attempt.
weihanglo pushed a commit to weihanglo/git2-rs that referenced this pull request Oct 19, 2026
Includes the test case from rust-lang#1226 that previously failed, as well as other
cases confirming that strings, booleans, and integers can be read from the
config individually.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug S-waiting-on-author Status: Waiting on PR author upstream An upstream issue with libgit2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants