Libelektra: cmerge: segfault

تم إنشاؤها على ١٥ نوفمبر ٢٠١٩  ·  7تعليقات  ·  مصدر: ElektraInitiative/libelektra

خطوات إعادة إظهار المشكلة

تكوين وجعل libelektra.

make run all

نتيجة متوقعة

كل الاختبارات تنجح.

نتيجة فعلية

The following tests FAILED:
    210 - testshell_markdown_cmerge (Failed)
    225 - test_cmerge (SEGFAULT)
 valgrind ./bin/test_cmerge
==200629== Memcheck, a memory error detector
==200629== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==200629== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==200629== Command: ./bin/test_cmerge
==200629== 
CMERGE       TESTS
==================

Executing testValuesWithGivenLength with size 59
==200629== Jump to the invalid address stated on the next line
==200629==    at 0x0: ???
==200629==    by 0xF: ???
==200629==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==200629== 
==200629== 
==200629== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==200629==  Bad permissions for mapped region at address 0x0
==200629==    at 0x0: ???
==200629==    by 0xF: ???
==200629== 
==200629== HEAP SUMMARY:
==200629==     in use at exit: 4,388 bytes in 64 blocks
==200629==   total heap usage: 169 allocs, 105 frees, 81,447 bytes allocated
==200629== 
==200629== LEAK SUMMARY:
==200629==    definitely lost: 0 bytes in 0 blocks
==200629==    indirectly lost: 0 bytes in 0 blocks
==200629==      possibly lost: 0 bytes in 0 blocks
==200629==    still reachable: 4,388 bytes in 64 blocks
==200629==         suppressed: 0 bytes in 0 blocks
==200629== Rerun with --leak-check=full to see details of leaked memory
==200629== 
==200629== For lists of detected and suppressed errors, rerun with: -s
==200629== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
[1]    200629 segmentation fault (core dumped)  valgrind ./bin/test_cmerge

معلومات النظام

  • نسخة إليكترا: سيد
  • فيدورا 31

مزيد من ملفات الدخول والإخراج

cmerge.txt

bug

التعليق الأكثر فائدة

@ Chemin1 أشكركم على

ال 7 كومينتر

لدي libgit2 0.28.3 على لينكس وهذا لا يعمل. تؤدي إزالة علامة الاختيار CMERGE_ON_LINUX في التعليمات البرمجية إلى إصلاح segfault.
https://github.com/ElektraInitiative/libelektra/blob/4ee9617186fe053107530624b27ff2825478f257/src/libs/merge/kdbmerge.c#L991

شكرا للإبلاغ عن هذه المشكلة!

يجب علينا بالتأكيد إصلاح هذا قبل 0.9.1. ربما ببساطة عن طريق تعطيل libgit2 في هذه الحالة.

mpranj هل يمكنك أيضًا نشر إخراج gdb ، فإن إخراج valgrind ليس مفيدًا جدًا.

أراهن أنه يتعلق بـ LibGit. يجب تهيئة المكتبة باستخدام git_libgit2_init () وفقًا لوثائقها.

عند عدم تهيئة LibGit على جميع أنظمة Linux الموجودة على خادم الإنشاء ، لا نحصل على أي تسرب للذاكرة. إذا بدأنا ، سنفعل. ومع ذلك ، إذا لم نبدأ إنشاءات FreeBSD ، فسنحصل على segfaults. هذا هو السبب وراء وجود تلك التعريفات الغريبة. لقد قمت أيضًا بعمل أول مشاركة لي في

نأمل # 3221 إصلاح هذا.

كما أن إخراج Gdb ليس مفيدًا جدًا. لست متأكدًا من السبب ، لدي رموز تصحيح الأخطاء للمكتبات وهي عبارة عن Debug build of elektra.

GNU gdb (GDB) Fedora 8.3.50.20190824-24.fc31
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bin/test_cmerge...
(gdb) r
Starting program: /home/mpranj/workspace/libelektra/build/bin/test_cmerge 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
CMERGE       TESTS
==================

Executing testValuesWithGivenLength with size 59

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) q

لقد تحققت من أن #ifndef CMERGE_ON_LINUX هو السبب الجذري في نظامي ، لكن لم يكن لدي الوقت لعمل تصحيح محمول له.

@ Chemin1 شكرا لك على العمل على ذلك!

@ Chemin1 أشكركم على

شكرا لاختباره ، mpranj !

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات

القضايا ذات الصلة

markus2330 picture markus2330  ·  585تعليقات

PhilippGackstatter picture PhilippGackstatter  ·  45تعليقات

markus2330 picture markus2330  ·  35تعليقات

markus2330 picture markus2330  ·  28تعليقات

markus2330 picture markus2330  ·  49تعليقات