Skip to content

Instantly share code, notes, and snippets.

@danluu
Created November 16, 2016 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danluu/2aa77c4da2a6ced3f28c4a3ac8971b46 to your computer and use it in GitHub Desktop.
Save danluu/2aa77c4da2a6ced3f28c4a3ac8971b46 to your computer and use it in GitHub Desktop.
NativeCode.AndRowJzDelta0
Thread 1 "PlanTest" received signal SIGSEGV, Segmentation fault.
0x00000000004ac958 in BitFunnel::MatchTreeCompiler::Run(unsigned long, void* const*, unsigned long, long const*, BitFunnel::ResultsBuffer&) ()
(gdb) bt
#0 0x00000000004ac958 in BitFunnel::MatchTreeCompiler::Run(unsigned long, void* const*, unsigned long, long const*, BitFunnel::ResultsBuffer&) ()
#1 0x0000000000499ac9 in BitFunnel::NativeCodeVerifier::Verify(char const*) ()
#2 0x0000000000499fb5 in BitFunnel::NativeCode_AndRowJzDelta0_Test::TestBody() ()
#3 0x000000000050f2dd in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ()
#4 0x00000000004f36c9 in testing::Test::Run() ()
#5 0x00000000004f4710 in testing::TestInfo::Run() ()
#6 0x00000000004f4e33 in testing::TestCase::Run() ()
#7 0x00000000004fda09 in testing::internal::UnitTestImpl::RunAllTests() ()
#8 0x000000000050fdaf in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ()
#9 0x00000000004fd510 in testing::UnitTest::Run() ()
#10 0x00000000005179d0 in main ()
@danluu
Copy link
Author

danluu commented Nov 16, 2016

   0x00000000004ac8ff <+47>:    callq  0x45c650 <memset@plt>
   0x00000000004ac904 <+52>:    mov    %r13,0x8(%rsp)
   0x00000000004ac909 <+57>:    mov    %r12,0x10(%rsp)
   0x00000000004ac90e <+62>:    mov    %r15,0x18(%rsp)
   0x00000000004ac913 <+67>:    mov    %r14,0x20(%rsp)
   0x00000000004ac918 <+72>:    movq   $0x0,0x28(%rsp)
   0x00000000004ac921 <+81>:    mov    0x8(%rbx),%rax
   0x00000000004ac925 <+85>:    mov    %rax,0x230(%rsp)
   0x00000000004ac92d <+93>:    movq   $0x0,0x238(%rsp)
   0x00000000004ac939 <+105>:   mov    0x18(%rbx),%rax
   0x00000000004ac93d <+109>:   mov    %rax,0x240(%rsp)
   0x00000000004ac945 <+117>:   lea    0x8(%rsp),%rdi
   0x00000000004ac94a <+122>:   callq  *0x88(%rbp)
   0x00000000004ac950 <+128>:   mov    0x238(%rsp),%rax
=> 0x00000000004ac958 <+136>:   mov    %rax,0x10(%rbx)
   0x00000000004ac95c <+140>:   add    $0x248,%rsp
   0x00000000004ac963 <+147>:   pop    %rbx
   0x00000000004ac964 <+148>:   pop    %r12
   0x00000000004ac966 <+150>:   pop    %r13
   0x00000000004ac968 <+152>:   pop    %r14
   0x00000000004ac96a <+154>:   pop    %r15
   0x00000000004ac96c <+156>:   pop    %rbp
   0x00000000004ac96d <+157>:   retq 

@danluu
Copy link
Author

danluu commented Nov 16, 2016

The function being called is:

->  0x1002d60d3: subq   $0x18, %rsp
    0x1002d60d7: movq   %rbp, (%rsp)
    0x1002d60db: leaq   0x18(%rsp), %rbp
    0x1002d60e0: movq   0x18(%rdi), %rsi
    0x1002d60e4: movq   (%rsi), %r8
    0x1002d60e7: movq   0x8(%rsi), %r9
    0x1002d60eb: movq   (%rdi), %rax
    0x1002d60ee: orq    %rax, %rax

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