On Fri, Jan 19, 2018 at 1:24 PM, Оля Тележная <olyatelezhnaya@xxxxxxxxx> wrote: > 2018-01-18 17:23 GMT+03:00 Christian Couder <christian.couder@xxxxxxxxx>: >> On Thu, Jan 18, 2018 at 12:49 PM, Оля Тележная <olyatelezhnaya@xxxxxxxxx> wrote: >>> 2018-01-18 9:20 GMT+03:00 Оля Тележная <olyatelezhnaya@xxxxxxxxx>: >>>> >>>> I think it's important to finish migrating process at first. I mean, >>>> now we are preparing and collecting everything in ref-filter, but we >>>> make resulting string and print still in cat-file. And I am not sure, >>>> but maybe it will not be possible to start using new atoms in cat-file >>>> while some part of logic still differs. >>> >>> I tried to make that part here: >>> https://github.com/telezhnaya/git/commit/19a148614f1d4db1f8e628eb4e6d7c819d2da875 >>> I know that the code is disgusting and there is a memory leak :) I >>> just try to reuse ref-filter logic, I will cleanup everything later. >>> At first, I try to make it work. >>> The problem is that I have segfault, and if I use gdb, I get: >>> >>> Program received signal SIGSEGV, Segmentation fault. >>> 0x0000000000000000 in ?? () >> >> Make sure that you compile with debug options like -g3. For example I use: >> >> $ make -j 4 DEVELOPER=1 CFLAGS="-g3" > > Is it OK that I get different test results with simple make and with > make with all that flags? > Have a code: https://github.com/telezhnaya/git/commits/catfile > I do: > > olya@ubuntu17-vm:~/git$ make install > olya@ubuntu17-vm:~/git$ cd t > olya@ubuntu17-vm:~/git/t$ ./t1006-cat-file.sh > > And I have 17 tests broken. > Then, without any changes in code, I do: > > olya@ubuntu17-vm:~/git$ make -j 4 DEVELOPER=1 CFLAGS="-g3" install > olya@ubuntu17-vm:~/git$ cd t > olya@ubuntu17-vm:~/git/t$ ./t1006-cat-file.sh > > And there is 42 tests broken. > And it's really hard to search for errors in such situation. Some segfaults and other memory issues might happen or not happen depending on how the code has been compiled. I think that if you fix all the memory related issues, the behavior should be the same.