Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592522 - dev-vcs/git[curl] segfault in git-remote-https after typo in clone command
Summary: dev-vcs/git[curl] segfault in git-remote-https after typo in clone command
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Robin Johnson
URL: http://marc.info/?l=git&m=14732558581...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-31 06:11 UTC by lekto
Modified: 2016-10-04 08:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_592522.txt,5.40 KB, text/plain)
2016-08-31 06:12 UTC, lekto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lekto 2016-08-31 06:11:09 UTC
I got segfault aftter run:
git clone https::/github.com/ClaverRaven/Cataclysm-DDA.git

git-2.9.3 on ~amd64
>Cloning into 'Cataclysm-DDA'...
>
>[ 2233.467691] git-remote-http[8597]: segfault at 0 ip 0000000000408f4d sp 00007ffee12dbc40 error 4 in git-remote-https[400000+102000]

git-2.7.3-r1 on amd64
>Cloning into 'Cataclysm-DDA'...
>fatal: unable to access '/github.com/ClaverRaven/Cataclysm-DDA.git/': <url> malformed

git-2.7.3-r1 on hardened x86
>Cloning into 'Cataclysm-DDA'...
>fatal: unable to access '/github.com/ClaverRaven/Cataclysm-DDA.git/': <url> malformed

Reproducible: Always
Comment 1 lekto 2016-08-31 06:12:24 UTC
Created attachment 444526 [details]
emerge --info
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-08-31 06:58:44 UTC
Any chance you can report that to upstream as well?
Comment 3 lekto 2016-08-31 11:17:05 UTC
It might be a Gentoo bug, git-9999 gives me a segfault too. When I manually download, compile and install git I get message "<url> malformed".
Comment 4 lekto 2016-08-31 11:18:08 UTC
Should I report this to upstream anyway?
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-08-31 11:34:44 UTC
(In reply to lekto from comment #4)
> Should I report this to upstream anyway?

No. Let's find the cause for this issue first.
Comment 6 lekto 2016-08-31 13:40:08 UTC
Strcmp (glib-2.23-r2) in http.c:606 is causing this segfault.
After remove this whole block (605-616) git don't cause segfault anymore, but I probably broke something else.

http.c:605
>if (!curl_http_proxy) {
>    if (!strcmp(http_auth.protocol, "https")) {
>        var_override(&curl_http_proxy, getenv("HTTPS_PROXY"));
>        var_override(&curl_http_proxy, getenv("https_proxy"));
>    } else {
>        var_override(&curl_http_proxy, getenv("http_proxy"));
>    }
>    if (!curl_http_proxy) {
>        var_override(&curl_http_proxy, getenv("ALL_PROXY"));
>        var_override(&curl_http_proxy, getenv("all_proxy"));
>    }
>}
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-09-19 09:36:59 UTC
Bug has been reported upstream and a fix was provided that will hopefully be in the next release of git.
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-10-04 08:46:20 UTC
Fixed in git-2.10.1