These are chat archives for Snaipe/Criterion

1st
Jul 2016
Douman
@DoumanAsh
Jul 01 2016 17:01
Hi, wanted to let you know: there is small issue with github releases. When it generates code tarball submodules are not initialized so there is no way to use release sources to build criterion. github's support told me that they take note of that but no promises if they're going to fix it. So... anyway letting you know cuz i stumbled on that myself :)
Franklin Mathieu
@Snaipe
Jul 01 2016 17:03
@DoumanAsh Right, you're actually the 2nd person this week to notify me of this issue, I'll add a bundled archive for this case. :)
Douman
@DoumanAsh
Jul 01 2016 18:23
That would be cool :)
Btw have been playing with mimick in my work environment... Kinda made it wok by moving from static libs to dynamic libs. But what is strange that even though mimick is able to stub function without a problem, the stub is not called at all :( I know this is WIP but do you have any advices @Snaipe ?
Franklin Mathieu
@Snaipe
Jul 01 2016 18:27
There are multiple factors in play here, so, in order:
  1. what platform (os + arch) are you on?
Douman
@DoumanAsh
Jul 01 2016 18:28
linux; 64bit;
Franklin Mathieu
@Snaipe
Jul 01 2016 18:28
\2. what libc are you using? (glibc or eglibc?)
Douman
@DoumanAsh
Jul 01 2016 18:28
glibc
Franklin Mathieu
@Snaipe
Jul 01 2016 18:28
okay, what are you doing when calling mmk_mock? (i.e. what line are you using?)
Douman
@DoumanAsh
Jul 01 2016 18:29
i'm actually creating stub, not mock
Franklin Mathieu
@Snaipe
Jul 01 2016 18:29
ah, well, same question for mmk_stub then
Douman
@DoumanAsh
Jul 01 2016 18:29
oh let me remember...
Franklin Mathieu
@Snaipe
Jul 01 2016 18:30
the things that can come to mind here at this point are either overzealous compiler optimisation or wrong selector usage
Douman
@DoumanAsh
Jul 01 2016 18:30
well i created just stub: mmk_stub_create("sctphost@self", sctphost_stub, 0) - i tried different selectors: lib:<dynamic_lib_with_symbol> and sym:sctphost
after i converted my lib from static to dynamic it started to return ok
but still no luck.
i tried to turn off all optimizations
and no luck too :(
Franklin Mathieu
@Snaipe
Jul 01 2016 18:33
assuming that sctphost doesn't have any fancy optimisation attribute such as __attribute__((pure)) it shouldn't be optimized away, so mimick might not be able to find the dynamic symbol
Douman
@DoumanAsh
Jul 01 2016 18:33
well in binary itself this symbol is U
so it is definitely not part of binary
Franklin Mathieu
@Snaipe
Jul 01 2016 18:33
this is interesting, if you don't mind, when you get the time, would you mind sending me the ELF file?
I'll try to see what happens asm-wise
Douman
@DoumanAsh
Jul 01 2016 18:35
ok, on next week :) i have doubts though cuz i'm using not standard toolchain. We have some modifications in toolchain
and our test binaries are running from PROOT as far as i remember :(
might affecting
Franklin Mathieu
@Snaipe
Jul 01 2016 18:35
if it comes from those modifications then it's a case that mimick should probably handle
Douman
@DoumanAsh
Jul 01 2016 18:37
i suppose, but then again our build system is so complex that i have no idea of how much of modifications :D
anyway thanks for help. I'll ping you next week
Franklin Mathieu
@Snaipe
Jul 01 2016 18:39
don't worry, it's probably a small change in the behaviour of ld.so or something of the sort. I've had my fair share of hair-pulling exceptions with eglibc already
No problem, thanks for the feedback :)
Douman
@DoumanAsh
Jul 01 2016 18:40
mimick's idea of run-time modification is so cool btw. Hopefully it will get stable soon :)
Ben Turrubiates
@bturrubiates
Jul 01 2016 18:40
I hadn’t heard of it before this conversation. Looks really neat!
Franklin Mathieu
@Snaipe
Jul 01 2016 18:41
It's becoming pretty stable tbh, at this points it's just about supporting corner cases such as this one + implementing spy functions, and I'll be able to call a first beta release
and thanks, hearing this is very exciting :)
Ben Turrubiates
@bturrubiates
Jul 01 2016 18:45
@Snaipe love the work you’re doing on making C tools that are modern and useful.
Franklin Mathieu
@Snaipe
Jul 01 2016 21:54
Thanks for the kind words!