From Fedora Project Wiki

No edit summary
(Indent <pre> tags. Still not sure what "meaningful information" means for debugging)
Line 2: Line 2:
|description=This test case tests the functionality of the [[Features/ABRT|ABRT]] together with [[Features/EasierPythonDebugging|EasierPythonDebugging]].
|description=This test case tests the functionality of the [[Features/ABRT|ABRT]] together with [[Features/EasierPythonDebugging|EasierPythonDebugging]].
|actions=
|actions=
* Try to run this one-liner python scripts that abuse the <code>ctypes</code> module in such a way as to cause <code>/usr/bin/python</code> to segfault/abort:
# Run the following python script that abuse the <code>ctypes</code> module in such a way as to cause <code>/usr/bin/python</code> to segfault/abort.
  <pre>$ python -c "import ctypes; ctypes.string_at(0xffffffff)"
## First, cause a ''segfault''
Segmentation fault (core dumped)</pre>
##: <pre>
  <pre>$ python -c "import ctypes; ctypes.string_at(0x0)"
##: python -c "import ctypes; ctypes.string_at(0xffffffff)"
python: Objects/stringobject.c:115: PyString_FromString: Assertion `str != ((void *)0)' failed.
##: Segmentation fault (core dumped)</pre>
Aborted (core dumped)</pre>
## Next, cause a ''core dump''
* repeat all of the above for <code>python3</code> and <code>python3-debuginfo</code>
##: <pre>
##: python -c "import ctypes; ctypes.string_at(0x0)"
##: python: Objects/stringobject.c:115: PyString_FromString: Assertion `str != ((void *)0)' failed.
##: Aborted (core dumped)</pre>
# Next, repeat all of the above for {{command|python3}}
# Finally, repeat the steps for {{command|python3-debuginfo}}
|results=
|results=
# In each case, there should be a meaningful information at the Python level, as well as at the C level in the bactrace.
# In each case, there should be meaningful information at the Python level, as well as at the C level in the bactrace.
#* please see [[Features/EasierPythonDebugging#How_To_Test|EasierPythonDebuggingTests]] for more information.
#* please see [[Features/EasierPythonDebugging#How_To_Test|EasierPythonDebuggingTests]] for more information.
}}
}}
[[Category:ABRT_Test_Cases]]
[[Category:ABRT_Test_Cases]]

Revision as of 13:44, 9 April 2010

Description

This test case tests the functionality of the ABRT together with EasierPythonDebugging.


How to test

  1. Run the following python script that abuse the ctypes module in such a way as to cause /usr/bin/python to segfault/abort.
    1. First, cause a segfault
      python -c "import ctypes; ctypes.string_at(0xffffffff)"
      Segmentation fault (core dumped)
    2. Next, cause a core dump
      python -c "import ctypes; ctypes.string_at(0x0)"
      python: Objects/stringobject.c:115: PyString_FromString: Assertion `str != ((void *)0)' failed.
      Aborted (core dumped)
  2. Next, repeat all of the above for python3
  3. Finally, repeat the steps for python3-debuginfo

Expected Results

  1. In each case, there should be meaningful information at the Python level, as well as at the C level in the bactrace.