I built libiec61850 in macOS 10.12.6 with AddressSanitizer(export CFLAGS="-g -fsanitize=address" CXXFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" before make).
I ran the sv_publisher in directory libiec61850/examples/sv_publisher by command sudo ./sv_publisher, however, there is a SEGV in function Ethernet_sendPacket in ethernet_bsd.c when the selected interface is unable.
Here is output with ASAN information:
Using interface eth0
Could not find the network interface eth0!Unable to select interface eth0!
ASAN:DEADLYSIGNAL
=================================================================
==77056==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000 (pc 0x0004e3bd bp 0xbffe6a18 sp 0xbffe69e0 T0)
==77056==The signal is caused by a READ memory access.
==77056==Hint: address points to the zero page.
#0 0x4e3bc in Ethernet_sendPacket ethernet_bsd.c:416
#1 0x4500c in SVPublisher_publish sv_publisher.c:488
#2 0x1acc7 in main sv_publisher_example.c:70
#3 0xa1541394 in start (libdyld.dylib:i386+0x5394)
==77056==Register values:
eax = 0x00000000 ebx = 0x00000000 ecx = 0x20000000 edx = 0x00000000
edi = 0x00000000 esi = 0x02f03880 ebp = 0xbffe6a18 esp = 0xbffe69e0
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ethernet_bsd.c:416 in Ethernet_sendPacket
==77056==ABORTING
Abort trap: 6
The text was updated successfully, but these errors were encountered:
Reason is an invalid interface id given at the command line or in general by the user application as an input for the Ethernet_create function. For now the library user has to ensure to provide a correct interface ID. Library side error handling will be added in version 1.4.
I built libiec61850 in macOS 10.12.6 with AddressSanitizer(
export CFLAGS="-g -fsanitize=address" CXXFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address"beforemake).I ran the
sv_publisherin directorylibiec61850/examples/sv_publisherby commandsudo ./sv_publisher, however, there is aSEGVin functionEthernet_sendPacketinethernet_bsd.cwhen the selected interface is unable.Here is output with ASAN information:
The text was updated successfully, but these errors were encountered: