-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I'm trying to get message data but I'm getting segfaults:
if (cmd == RES1):
print("1 SPI_IOC_MESSAGE")
print("struct addr", data)
msg = spi_ioc_transfer.from_address(data)
data_len = int(msg.len)
tx_buf_add = int(msg.tx_buf)
print("tx_buf addr", tx_buf_add)
print("data_len", data_len)
tx_buf = (ctypes.c_ubyte).from_address(tx_buf_add)
print(tx_buf)
# print(''.join([i for i in tx_buf]))
return msg.len
if (cmd == RES2):
results in:
DEBUG:fuse.log-mixin:-> ioctl / (1075866368L, 140722147878816, 1L, 0L, 139711975837784)
1075866368
1 SPI_IOC_MESSAGE
struct addr 139711975837784
tx_buf addr 140722147878848
data_len 38
Segmentation fault (core dumped)
data_len is correct but the tx_buf address is very strange.
Can you help?
Metadata
Metadata
Assignees
Labels
No labels