Title: git_index_entry* can't read path on ubuntu. · Issue #35 · libgit2/libgit2 · GitHub
Open Graph Title: git_index_entry* can't read path on ubuntu. · Issue #35 · libgit2/libgit2
X Title: git_index_entry* can't read path on ubuntu. · Issue #35 · libgit2/libgit2
Description: im tring to use libgit2 on my ubuntu 10.10. i found Segmentation fault when try to read git_index_entry->path. git clone https://github.com/libgit2/libgit2.git cd libgit2 ./waf configure ./waf build-shared sudo ./waf install-shared cat >...
Open Graph Description: im tring to use libgit2 on my ubuntu 10.10. i found Segmentation fault when try to read git_index_entry->path. git clone https://github.com/libgit2/libgit2.git cd libgit2 ./waf configure ./waf buil...
X Description: im tring to use libgit2 on my ubuntu 10.10. i found Segmentation fault when try to read git_index_entry->path. git clone https://github.com/libgit2/libgit2.git cd libgit2 ./waf configure ./waf b...
Opengraph URL: https://github.com/libgit2/libgit2/issues/35
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"git_index_entry* can't read path on ubuntu.","articleBody":"im tring to use libgit2 on my ubuntu 10.10.\ni found Segmentation fault when try to read git_index_entry-\u003epath.\n\n```\ngit clone https://github.com/libgit2/libgit2.git\ncd libgit2\n./waf configure\n./waf build-shared\nsudo ./waf install-shared\n\ncat \u003e git_index_test.c \u003c\u003cEOF\n#include \u003cstdio.h\u003e\n#include \u003cgit2.h\u003e\n\nint main(int argc, char * args[])\n{\n git_index_entry *entry;\n git_index *index;\n git_index_open_bare(\u0026index,\".git/index\");\n\n git_index_read(index);\n git_index_entrycount(index);\n int offset = git_index_find(index,\"README.md\");\n\n entry = git_index_get(index,offset);\n\n printf(\"pointer_address: %d\\n\", entry-\u003epath);\n //Segmentation fault on my machine.\n printf(\"path: %s\\n\",entry-\u003epath);\n git_index_free(index);\n\n return 0;\n}\nEOF\n\ngcc -lgit2 -o git_index_test git_index_test.c\n\n./git_index_test\npointer_address: 9\nSegmentation fault\n```\n\nI searched reason. but i couldn't understand.\ngit_index_entry-\u003epath readable in git_index_get(). but git_index_entry-\u003epath was wrong address in main.\n\n(but ruggaed work well on my machine.probably i missunderstood something...)\n\nCould you please advice me how to fix this probrem?\n\n```\n$ gcc -v\nUsing built-in specs.\nTarget: i686-linux-gnu\nConfigured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu\nThread model: posix\ngcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) \n```\n","author":{"url":"https://github.com/chobie","@type":"Person","name":"chobie"},"datePublished":"2010-12-26T08:03:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/35/libgit2/issues/35"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5eba9d00-62b9-db45-924a-8eda1f86a817 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7D6:11682C:707287C:9934813:6A5E3A07 |
| html-safe-nonce | bb4e3c583e10fc30bdca0a0fbcf23571e4b8dbe3593ef051ccc9b8ccd05a858d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0Q2OjExNjgyQzo3MDcyODdDOjk5MzQ4MTM6NkE1RTNBMDciLCJ2aXNpdG9yX2lkIjoiOTIwMjU0OTk2ODQ2ODg1MTIwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 315f759370b534ef966b321d05e46d4347b08e6560772b43367f486b9b545bd2 |
| hovercard-subject-tag | issue:492559 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/libgit2/libgit2/35/issue_layout |
| twitter:image | https://opengraph.githubassets.com/829840a53d54f13d4435944203a26b6f514eb597440bd49a7f0c6cd7e57ab7a8/libgit2/libgit2/issues/35 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/829840a53d54f13d4435944203a26b6f514eb597440bd49a7f0c6cd7e57ab7a8/libgit2/libgit2/issues/35 |
| og:image:alt | im tring to use libgit2 on my ubuntu 10.10. i found Segmentation fault when try to read git_index_entry->path. git clone https://github.com/libgit2/libgit2.git cd libgit2 ./waf configure ./waf buil... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chobie |
| hostname | github.com |
| expected-hostname | github.com |
| None | e4b946991e2bd4b122ac7bb3d405be22af15feed82daaafcd1fe0a1231d54061 |
| turbo-cache-control | no-preview |
| go-import | github.com/libgit2/libgit2 git https://github.com/libgit2/libgit2.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 901662 |
| octolytics-dimension-repository_nwo | libgit2/libgit2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 901662 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a421a3a9fbeebe1ed5ba7c8e5b803b098d65a30e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width