hoche / splat

SPLAT! is an RF Signal Propagation, Loss, And Terrain analysis tool for the spectrum between 20 MHz and 20 GHz. This is a copy of the code written by John Magliacane, heavily modified to clean up the code and take advantage of multithreading. This incorporates John's antenna height modifications from the as-yet-unreleased SPLAT 1.4.3.
http://www.qsl.net/kd2bd/splat.html
GNU General Public License v2.0
27 stars 6 forks source link

BUG - 2.0-alpha Segfault under FreeBSD #36

Open dBitech opened 3 years ago

dBitech commented 3 years ago

2.0-alpha faults on FreeBSD (built using clang)

Using 8 threads...

 0% to  25% Process 55587 stopped
* thread #7, name = 'splat', stop reason = signal SIGSEGV: invalid address (fault address: 0xa0)
    frame #0: 0x0000000801c3d96f libc.so.7`_flockfile + 15
libc.so.7`_flockfile:
->  0x801c3d96f <+15>: cmpq   %rax, 0xa0(%rbx)
    0x801c3d976 <+22>: je     0x801c3d99a               ; <+58>
    0x801c3d978 <+24>: movq   %rax, %r14
    0x801c3d97b <+27>: leaq   0x98(%rbx), %rdi
(lldb) bt
* thread #7, name = 'splat', stop reason = signal SIGSEGV: invalid address (fault address: 0xa0)
  * frame #0: 0x0000000801c3d96f libc.so.7`_flockfile + 15
    frame #1: 0x0000000801c41fff libc.so.7`fwrite + 63
    frame #2: 0x000000000021d58e splat`ElevationMap::PlotLRPath(Site const&, Site const&, unsigned char, __sFILE*, AntennaPattern const&, Lrp const&) + 3486
    frame #3: 0x000000000021e7f0 splat`std::__1::__function::__func<std::__1::__bind<void (ElevationMap::*)(Site const&, Site const&, unsigned char, __sFILE*, AntennaPattern const&, Lrp const&), ElevationMap*, Site const&, Site&, unsigned char&, __sFILE*&, std::__1::reference_wrapper<AntennaPattern const>, Lrp const&>, std::__1::allocator<std::__1::__bind<void (ElevationMap::*)(Site const&, Site const&, unsigned char, __sFILE*, AntennaPattern const&, Lrp const&), ElevationMap*, Site const&, Site&, unsigned char&, __sFILE*&, std::__1::reference_wrapper<AntennaPattern const>, Lrp const&> >, void ()>::operator()() + 80
    frame #4: 0x000000000023f20c splat`WorkQueue::doWork() + 444
    frame #5: 0x000000000023fd3d splat`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (WorkQueue::*) (), WorkQueue*> >(void*) + 61
    frame #6: 0x000000080039c82b libthr.so.3`___lldb_unnamed_symbol11$$libthr.so.3 + 331
(lldb)
der-stefan commented 3 years ago

Any clue about where the segfault comes from?

dBitech commented 2 years ago

The segfault comes from trying to write to the numeric output file although there is none specified on the cmd line (no -ano parameter provided)