Skip to content
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

Signal fault (11) on newest code #40

Open
dubcanada opened this issue Nov 13, 2012 · 0 comments
Open

Signal fault (11) on newest code #40

dubcanada opened this issue Nov 13, 2012 · 0 comments

Comments

@dubcanada
Copy link

Hey,

I'm getting a single fault now when I try to do the following, which used to work.

    $repo = new Git2\Repository('/tmp/jquery.git');
    $sha = \Git2\Reference::lookup($repo,"refs/heads/master");
    $ref = $sha->resolve();

    $commit = $repo->lookup($ref->getTarget());
            if ($commit instanceof Git2\Tag) {
                $commit = $commit->getTarget();
            }

    $tree = $commit->getTree();
    $subtree = $tree->getSubTree('/src/');

    foreach($tree as $oid => $entry) {
        print "<pre><br>";
        print $entry->name;
        print " - ".$oid;
        var_dump($entry->isTree());
        var_dump($entry->isSubmodule());
        var_dump($repo->lookup($oid)); <-- This line
    }

Upon removing the var_dump($repo->lookup($oid)); it begins working again.

Btw I am using a git clone --bare jquery repo

gdb backtrace

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000040
0x000000010193a3c3 in git_object_type (obj=0x20) at object.c:260
260     return obj->type;

Regards,

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

No branches or pull requests

1 participant