>
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN6Stream15getFieldAddressEPKcR12StreamBuffer+0xcd)[0x7f9c3d4bd34d]
I found the bug in getFieldAddress:
// FIELD in this record or VAL in other record
char fullname[PVNAME_SZ + 1];
sprintf(fullname, "%s.%s", name(), fieldname);
if (dbNameToAddr(fullname, &dbaddr) != OK)
{
// VAL in other record
sprintf(fullname, "%s.VAL", fieldname);
if (dbNameToAddr(fullname, &dbaddr) != OK) return false;
}
The first sprintf prints
$(device):StatEnable.$(device):StatEnableInterlock which is way too
long. My fault. I will send a patch soon....
Dirk
On 07.04.2015 16:38, ruzickaj wrote:
Hello Dirk,
thank you very much for hints.
My terminator is carriage return.
I have also mixed data types as response from device (string and numbers).
That is the reason why I did not use mbbi. Anyway thank you for default
value assignment
for me totally new. Bellow is shell output with ioc start up and buffer
overflow.
Best Regards,
Jan
#!../../bin/linux-x86_64/diode
## You may have to change diode to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocdiode")
epicsEnvSet("TOP","/home/davidmichel/HiLASE/experimental/cw")
epicsEnvSet("EPICS_BASE","/usr/local/epics/base")
epicsEnvSet("STREAMDEVICE","/usr/local/epics/support/stream/current")
epicsEnvSet("ASYN","/usr/local/epics/support/asyn/current")
epicsEnvSet("AUTOSAVE","/usr/local/epics/support/autosave/current")
cd /home/davidmichel/HiLASE/experimental/cw
## Register all support components
dbLoadDatabase "dbd/diode.dbd"
diode_registerRecordDeviceDriver pdbbase
## Autosave setup
set_savefile_path("/home/davidmichel/HiLASE/experimental/cw/autoSaveRestore")
set_requestfile_path("/home/davidmichel/HiLASE/experimental/cw/autoSaveRestore")
set_pass0_restoreFile("diode.sav")
## Asyn/stream setup
epicsEnvSet("STREAM_PROTOCOL_PATH","/home/davidmichel/HiLASE/experimental/cw/protocols")
#drvAsynSerialPortConfigure("fibotec1","/dev/ttyS1")
drvAsynSerialPortConfigure("fibotec1","/dev/ttyS1",0,0,0)
asynSetOption("fibotec1",0,"baud","115200")
asynSetOption("fibotec1",0,"bits","8")
asynSetOption("fibotec1",0,"parity","none")
asynSetOption("fibotec1",0,"stop","1")
asynSetOption("fibotec1",0,"clocal","Y")
asynSetOption("fibotec1",0,"crtscts","N")
#asynOctetSetInputEos("fibotec1", -1, "\r")
#asynOctetSetOutputEos("fibotec1", -1, "\r")
#asynSetTraceMask("fibotec1",-1,0x9)
#asynSetTraceIOMask("fibotec1",-1,0x2)
epicsEnvSet("DEVICE", "TEST_CO-CWS")
## Load record instances
dbLoadRecords("db/fibotecLtbis.db", "device=TEST_CO-CWS, port=fibotec1")
dbLoadRecords("db/fibotecLtbisChannel.db", "device=TEST_CO-CWS:CH1,
port=fibotec1, channel=1")
dbLoadRecords("db/fibotecLtbisChannel.db", "device=TEST_CO-CWS:CH2,
port=fibotec1, channel=2")
dbLoadRecords("db/fibotecLtbisChannel.db", "device=TEST_CO-CWS:CH3,
port=fibotec1, channel=3")
dbLoadRecords("db/fibotecLtbisChannel.db", "device=TEST_CO-CWS:CH4,
port=fibotec1, channel=4")
cd /home/davidmichel/HiLASE/experimental/cw/iocBoot/iocdiode
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.3 $Date: Mon 2012-12-17 14:11:47 -0600$
## EPICS Base built Aug 8 2013
############################################################################
reboot_restore: entry for file 'diode.sav'
reboot_restore (v5.1): entry for file 'diode.sav'
reboot_restore: Found filename 'diode.sav' in restoreFileList.
*** restoring from
'/home/davidmichel/HiLASE/experimental/cw/autoSaveRestore/diode.sav' at
initHookState 6 (before record/device init) ***
reboot_restore: done with file 'diode.sav'
*** buffer overflow detected ***: ../../bin/linux-x86_64/diode terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f9c3c0fe387]
/lib/x86_64-linux-gnu/libc.so.6(+0x109280)[0x7f9c3c0fd280]
/lib/x86_64-linux-gnu/libc.so.6(+0x1086e9)[0x7f9c3c0fc6e9]
/lib/x86_64-linux-gnu/libc.so.6(_IO_default_xsputn+0xdd)[0x7f9c3c06f3bd]
/lib/x86_64-linux-gnu/libc.so.6(_IO_vfprintf+0x25c2)[0x7f9c3c03ec32]
/lib/x86_64-linux-gnu/libc.so.6(__vsprintf_chk+0x94)[0x7f9c3c0fc784]
/lib/x86_64-linux-gnu/libc.so.6(__sprintf_chk+0x7d)[0x7f9c3c0fc6cd]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN6Stream15getFieldAddressEPKcR12StreamBuffer+0xcd)[0x7f9c3d4bd34d]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN20StreamProtocolParser8Protocol13compileFormatER12StreamBufferRPKc10FormatTypePNS_6ClientE+0x40b)[0x7f9c3d4b362b]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN20StreamProtocolParser8Protocol13compileStringER12StreamBufferRPKc10FormatTypePNS_6ClientEi+0x3ac)[0x7f9c3d4b3d4c]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN10StreamCore14compileCommandEPN20StreamProtocolParser8ProtocolER12StreamBufferPKcRS6_+0x16a)[0x7f9c3d4b6d4a]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN20StreamProtocolParser8Protocol15compileCommandsER12StreamBufferRPKcPNS_6ClientE+0x73)[0x7f9c3d4b4c63]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN20StreamProtocolParser8Protocol11getCommandsEPKcR12StreamBufferPNS_6ClientE+0xab)[0x7f9c3d4b4dfb]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN10StreamCore7compileEPN20StreamProtocolParser8ProtocolE+0x35c)[0x7f9c3d4b7f1c]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN10StreamCore5parseEPKcS1_+0x137)[0x7f9c3d4b8077]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(_ZN6Stream10initRecordEPKcS1_S1_iS1_+0x9e)[0x7f9c3d4bf57e]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(streamInitRecord+0xde)[0x7f9c3d4bf93e]
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so(+0x1bd2e)[0x7f9c3d4abd2e]
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librecIoc.so.3.14(+0xa569)[0x7f9c3d052569]
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libmiscIoc.so.3.14(iocBuild+0x42f)[0x7f9c3cc3e91f]
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libmiscIoc.so.3.14(iocInit+0x9)[0x7f9c3cc3ec69]
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libCom.so.3.14(+0x2b578)[0x7f9c3c3de578]
../../bin/linux-x86_64/diode[0x404e82]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f9c3c01576d]
../../bin/linux-x86_64/diode[0x404ecd]
======= Memory map: ========
00400000-00407000 r-xp 00000000 08:03 142048
/home/davidmichel/HiLASE/experimental/cw/bin/linux-x86_64/diode
00606000-00607000 r--p 00006000 08:03 142048
/home/davidmichel/HiLASE/experimental/cw/bin/linux-x86_64/diode
00607000-00608000 rw-p 00007000 08:03 142048
/home/davidmichel/HiLASE/experimental/cw/bin/linux-x86_64/diode
00608000-00609000 rw-p 00000000 00:00 0
01577000-0167f000 rw-p 00000000 00:00 0 [heap]
7f9c1c000000-7f9c1c021000 rw-p 00000000 00:00 0
7f9c1c021000-7f9c20000000 ---p 00000000 00:00 0
7f9c24000000-7f9c24021000 rw-p 00000000 00:00 0
7f9c24021000-7f9c28000000 ---p 00000000 00:00 0
7f9c28000000-7f9c28021000 rw-p 00000000 00:00 0
7f9c28021000-7f9c2c000000 ---p 00000000 00:00 0
7f9c2c000000-7f9c2c021000 rw-p 00000000 00:00 0
7f9c2c021000-7f9c30000000 ---p 00000000 00:00 0
7f9c30000000-7f9c30021000 rw-p 00000000 00:00 0
7f9c30021000-7f9c34000000 ---p 00000000 00:00 0
7f9c34000000-7f9c34021000 rw-p 00000000 00:00 0
7f9c34021000-7f9c38000000 ---p 00000000 00:00 0
7f9c3980a000-7f9c3980b000 ---p 00000000 00:00 0
7f9c3980b000-7f9c3990b000 rw-p 00000000 00:00 0 [stack:2513]
7f9c3990b000-7f9c3990c000 ---p 00000000 00:00 0
7f9c3990c000-7f9c39b0c000 rw-p 00000000 00:00 0 [stack:2512]
7f9c39b0c000-7f9c39b0d000 ---p 00000000 00:00 0
7f9c39b0d000-7f9c39d0d000 rw-p 00000000 00:00 0 [stack:2511]
7f9c39d0d000-7f9c39d0e000 ---p 00000000 00:00 0
7f9c39d0e000-7f9c39f0e000 rw-p 00000000 00:00 0 [stack:2510]
7f9c39f0e000-7f9c39f0f000 ---p 00000000 00:00 0
7f9c39f0f000-7f9c3a10f000 rw-p 00000000 00:00 0 [stack:2509]
7f9c3a10f000-7f9c3a110000 ---p 00000000 00:00 0
7f9c3a110000-7f9c3a210000 rw-p 00000000 00:00 0 [stack:2508]
7f9c3a210000-7f9c3a211000 ---p 00000000 00:00 0
7f9c3a211000-7f9c3a291000 rw-p 00000000 00:00 0 [stack:2507]
7f9c3a291000-7f9c3a292000 ---p 00000000 00:00 0
7f9c3a292000-7f9c3a392000 rw-p 00000000 00:00 0 [stack:2506]
7f9c3a392000-7f9c3a393000 ---p 00000000 00:00 0
7f9c3a393000-7f9c3a493000 rw-p 00000000 00:00 0 [stack:2505]
7f9c3a493000-7f9c3a4b5000 r-xp 00000000 08:03 1969840
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7f9c3a4b5000-7f9c3a6b5000 ---p 00022000 08:03 1969840
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7f9c3a6b5000-7f9c3a6b9000 r--p 00022000 08:03 1969840
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7f9c3a6b9000-7f9c3a6ba000 rw-p 00026000 08:03 1969840
/lib/x86_64-linux-gnu/libtinfo.so.5.9
7f9c3a6ba000-7f9c3a6bc000 r-xp 00000000 08:03 1990009
/lib/x86_64-linux-gnu/libdl-2.15.so
7f9c3a6bc000-7f9c3a8bc000 ---p 00002000 08:03 1990009
/lib/x86_64-linux-gnu/libdl-2.15.so
7f9c3a8bc000-7f9c3a8bd000 r--p 00002000 08:03 1990009
/lib/x86_64-linux-gnu/libdl-2.15.so
7f9c3a8bd000-7f9c3a8be000 rw-p 00003000 08:03 1990009
/lib/x86_64-linux-gnu/libdl-2.15.so
7f9c3a8be000-7f9c3a8c5000 r-xp 00000000 08:03 1989992
/lib/x86_64-linux-gnu/librt-2.15.so
7f9c3a8c5000-7f9c3aac4000 ---p 00007000 08:03 1989992
/lib/x86_64-linux-gnu/librt-2.15.so
7f9c3aac4000-7f9c3aac5000 r--p 00006000 08:03 1989992
/lib/x86_64-linux-gnu/librt-2.15.so
7f9c3aac5000-7f9c3aac6000 rw-p 00007000 08:03 1989992
/lib/x86_64-linux-gnu/librt-2.15.so
7f9c3aac6000-7f9c3aaff000 r-xp 00000000 08:03 1969826
/lib/x86_64-linux-gnu/libreadline.so.6.2
7f9c3aaff000-7f9c3acff000 ---p 00039000 08:03 1969826
/lib/x86_64-linux-gnu/libreadline.so.6.2
7f9c3acff000-7f9c3ad01000 r--p 00039000 08:03 1969826
/lib/x86_64-linux-gnu/libreadline.so.6.2
7f9c3ad01000-7f9c3ad07000 rw-p 0003b000 08:03 1969826
/lib/x86_64-linux-gnu/libreadline.so.6.2
7f9c3ad07000-7f9c3ad08000 rw-p 00000000 00:00 0
7f9c3ad08000-7f9c3ad0c000 r-xp 00000000 08:03 2371472
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbtoolsIoc.so.3.14
7f9c3ad0c000-7f9c3af0b000 ---p 00004000 08:03 2371472
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbtoolsIoc.so.3.14
7f9c3af0b000-7f9c3af0c000 r--p 00003000 08:03 2371472
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbtoolsIoc.so.3.14
7f9c3af0c000-7f9c3af0d000 rw-p 00004000 08:03 2371472
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbtoolsIoc.so.3.14
7f9c3af0d000-7f9c3af0e000 rw-p 00000000 00:00 0
7f9c3af0e000-7f9c3af1e000 r-xp 00000000 08:03 2371475
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librsrvIoc.so.3.14
7f9c3af1e000-7f9c3b11d000 ---p 00010000 08:03 2371475
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librsrvIoc.so.3.14
7f9c3b11d000-7f9c3b11e000 r--p 0000f000 08:03 2371475
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librsrvIoc.so.3.14
7f9c3b11e000-7f9c3b11f000 rw-p 00010000 08:03 2371475
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librsrvIoc.so.3.14
7f9c3b11f000-7f9c3b17f000 r-xp 00000000 08:03 2371451
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libca.so.3.14
7f9c3b17f000-7f9c3b37e000 ---p 00060000 08:03 2371451
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libca.so.3.14
7f9c3b37e000-7f9c3b382000 r--p 0005f000 08:03 2371451
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libca.so.3.14
7f9c3b382000-7f9c3b384000 rw-p 00063000 08:03 2371451
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libca.so.3.14
7f9c3b384000-7f9c3b399000 r-xp 00000000 08:03 1969764
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f9c3b399000-7f9c3b598000 ---p 00015000 08:03 1969764
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f9c3b598000-7f9c3b599000 r--p 00014000 08:03 1969764
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f9c3b599000-7f9c3b59a000 rw-p 00015000 08:03 1969764
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f9c3b59a000-7f9c3b695000 r-xp 00000000 08:03 1990008
/lib/x86_64-linux-gnu/libm-2.15.so
7f9c3b695000-7f9c3b894000 ---p 000fb000 08:03 1990008
/lib/x86_64-linux-gnu/libm-2.15.so
7f9c3b894000-7f9c3b895000 r--p 000fa000 08:03 1990008
/lib/x86_64-linux-gnu/libm-2.15.so
7f9c3b895000-7f9c3b896000 rw-p 000fb000 08:03 1990008
/lib/x86_64-linux-gnu/libm-2.15.so
7f9c3b896000-7f9c3b978000 r-xp 00000000 08:03 925456
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f9c3b978000-7f9c3bb77000 ---p 000e2000 08:03 925456
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f9c3bb77000-7f9c3bb7f000 r--p 000e1000 08:03 925456
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f9c3bb7f000-7f9c3bb81000 rw-p 000e9000 08:03 925456
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16
7f9c3bb81000-7f9c3bb96000 rw-p 00000000 00:00 0
7f9c3bb96000-7f9c3bbae000 r-xp 00000000 08:03 1989999
/lib/x86_64-linux-gnu/libpthread-2.15.so
7f9c3bbae000-7f9c3bdad000 ---p 00018000 08:03 1989999
/lib/x86_64-linux-gnu/libpthread-2.15.so
7f9c3bdad000-7f9c3bdae000 r--p 00017000 08:03 1989999
/lib/x86_64-linux-gnu/libpthread-2.15.so
7f9c3bdae000-7f9c3bdaf000 rw-p 00018000 08:03 1989999
/lib/x86_64-linux-gnu/libpthread-2.15.so
7f9c3bdaf000-7f9c3bdb3000 rw-p 00000000 00:00 0
7f9c3bdb3000-7f9c3bdef000 r-xp 00000000 08:03 2371463
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbIoc.so.3.14
7f9c3bdef000-7f9c3bfee000 ---p 0003c000 08:03 2371463
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbIoc.so.3.14
7f9c3bfee000-7f9c3bff0000 r--p 0003b000 08:03 2371463
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbIoc.so.3.14
7f9c3bff0000-7f9c3bff2000 rw-p 0003d000 08:03 2371463
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbIoc.so.3.14
7f9c3bff2000-7f9c3bff4000 rw-p 00000000 00:00 0
7f9c3bff4000-7f9c3c1a8000 r-xp 00000000 08:03 1989998
/lib/x86_64-linux-gnu/libc-2.15.so
7f9c3c1a8000-7f9c3c3a8000 ---p 001b4000 08:03 1989998
/lib/x86_64-linux-gnu/libc-2.15.so
7f9c3c3a8000-7f9c3c3ac000 r--p 001b4000 08:03 1989998
/lib/x86_64-linux-gnu/libc-2.15.so
7f9c3c3ac000-7f9c3c3ae000 rw-p 001b8000 08:03 1989998
/lib/x86_64-linux-gnu/libc-2.15.so
7f9c3c3ae000-7f9c3c3b3000 rw-p 00000000 00:00 0
7f9c3c3b3000-7f9c3c407000 r-xp 00000000 08:03 2371448
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libCom.so.3.14
7f9c3c407000-7f9c3c606000 ---p 00054000 08:03 2371448
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libCom.so.3.14
7f9c3c606000-7f9c3c609000 r--p 00053000 08:03 2371448
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libCom.so.3.14
7f9c3c609000-7f9c3c60b000 rw-p 00056000 08:03 2371448
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libCom.so.3.14
7f9c3c60b000-7f9c3c60c000 rw-p 00000000 00:00 0
7f9c3c60c000-7f9c3c627000 r-xp 00000000 08:03 2371456
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbStaticIoc.so.3.14
7f9c3c627000-7f9c3c826000 ---p 0001b000 08:03 2371456
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbStaticIoc.so.3.14
7f9c3c826000-7f9c3c827000 r--p 0001a000 08:03 2371456
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbStaticIoc.so.3.14
7f9c3c827000-7f9c3c828000 rw-p 0001b000 08:03 2371456
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libdbStaticIoc.so.3.14
7f9c3c828000-7f9c3c82a000 rw-p 00000000 00:00 0
7f9c3c82a000-7f9c3c82c000 r-xp 00000000 08:03 2371460
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libregistryIoc.so.3.14
7f9c3c82c000-7f9c3ca2b000 ---p 00002000 08:03 2371460
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libregistryIoc.so.3.14
7f9c3ca2b000-7f9c3ca2c000 r--p 00001000 08:03 2371460
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libregistryIoc.so.3.14
7f9c3ca2c000-7f9c3ca2d000 rw-p 00002000 08:03 2371460
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libregistryIoc.so.3.14
7f9c3ca2d000-7f9c3ca3a000 r-xp 00000000 08:03 2371468
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libasIoc.so.3.14
7f9c3ca3a000-7f9c3cc39000 ---p 0000d000 08:03 2371468
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libasIoc.so.3.14
7f9c3cc39000-7f9c3cc3a000 r--p 0000c000 08:03 2371468
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libasIoc.so.3.14
7f9c3cc3a000-7f9c3cc3b000 rw-p 0000d000 08:03 2371468
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libasIoc.so.3.14
7f9c3cc3b000-7f9c3cc3c000 rw-p 00000000 00:00 0
7f9c3cc3c000-7f9c3cc40000 r-xp 00000000 08:03 2371481
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libmiscIoc.so.3.14
7f9c3cc40000-7f9c3ce3f000 ---p 00004000 08:03 2371481
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libmiscIoc.so.3.14
7f9c3ce3f000-7f9c3ce40000 r--p 00003000 08:03 2371481
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libmiscIoc.so.3.14
7f9c3ce40000-7f9c3ce41000 rw-p 00004000 08:03 2371481
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libmiscIoc.so.3.14
7f9c3ce41000-7f9c3ce47000 r-xp 00000000 08:03 2371484
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libsoftDevIoc.so.3.14
7f9c3ce47000-7f9c3d046000 ---p 00006000 08:03 2371484
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libsoftDevIoc.so.3.14
7f9c3d046000-7f9c3d047000 r--p 00005000 08:03 2371484
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libsoftDevIoc.so.3.14
7f9c3d047000-7f9c3d048000 rw-p 00006000 08:03 2371484
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/libsoftDevIoc.so.3.14
7f9c3d048000-7f9c3d06e000 r-xp 00000000 08:03 2371478
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librecIoc.so.3.14
7f9c3d06e000-7f9c3d26e000 ---p 00026000 08:03 2371478
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librecIoc.so.3.14
7f9c3d26e000-7f9c3d26f000 r--p 00026000 08:03 2371478
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librecIoc.so.3.14
7f9c3d26f000-7f9c3d271000 rw-p 00027000 08:03 2371478
/usr/local/epics/base-3.14.12.3/lib/linux-x86_64/librecIoc.so.3.14
7f9c3d271000-7f9c3d28d000 r-xp 00000000 08:03 3539297
/usr/local/epics/support/autosave/autosave-5-1/lib/linux-x86_64/libautosave.so
7f9c3d28d000-7f9c3d48d000 ---p 0001c000 08:03 3539297
/usr/local/epics/support/autosave/autosave-5-1/lib/linux-x86_64/libautosave.so
7f9c3d48d000-7f9c3d48e000 r--p 0001c000 08:03 3539297
/usr/local/epics/support/autosave/autosave-5-1/lib/linux-x86_64/libautosave.so
7f9c3d48e000-7f9c3d48f000 rw-p 0001d000 08:03 3539297
/usr/local/epics/support/autosave/autosave-5-1/lib/linux-x86_64/libautosave.so
7f9c3d48f000-7f9c3d490000 rw-p 00000000 00:00 0
7f9c3d490000-7f9c3d4ce000 r-xp 00000000 08:03 932133
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so
7f9c3d4ce000-7f9c3d6ce000 ---p 0003e000 08:03 932133
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so
7f9c3d6ce000-7f9c3d6d0000 r--p 0003e000 08:03 932133
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so
7f9c3d6d0000-7f9c3d6d2000 rw-p 00040000 08:03 932133
/usr/local/epics/support/stream/StreamDevice-2-6/lib/linux-x86_64/libstream.so
7f9c3d6d2000-7f9c3d73e000 r-xp 00000000 08:03 3674172
/usr/local/epics/support/asyn/r2251/lib/linux-x86_64/libasyn.so
7f9c3d73e000-7f9c3d93d000 ---p 0006c000 08:03 3674172
/usr/local/epics/support/asyn/r2251/lib/linux-x86_64/libasyn.so
7f9c3d93d000-7f9c3d93f000 r--p 0006b000 08:03 3674172
/usr/local/epics/support/asyn/r2251/lib/linux-x86_64/libasyn.so
7f9c3d93f000-7f9c3d942000 rw-p 0006d000 08:03 3674172
/usr/local/epics/support/asyn/r2251/lib/linux-x86_64/libasyn.so
7f9c3d942000-7f9c3d964000 r-xp 00000000 08:03 1990007
/lib/x86_64-linux-gnu/ld-2.15.so
7f9c3d9bc000-7f9c3d9bd000 ---p 00000000 00:00 0
7f9c3d9bd000-7f9c3dabd000 rw-p 00000000 00:00 0 [stack:2504]
7f9c3dabd000-7f9c3dabe000 ---p 00000000 00:00 0
7f9c3dabe000-7f9c3db49000 rw-p 00000000 00:00 0 [stack:2503]
7f9c3db5c000-7f9c3db64000 rw-p 00000000 00:00 0
7f9c3db64000-7f9c3db65000 r--p 00022000 08:03 1990007
/lib/x86_64-linux-gnu/ld-2.15.so
7f9c3db65000-7f9c3db67000 rw-p 00023000 08:03 1990007
/lib/x86_64-linux-gnu/ld-2.15.so
7fffa2512000-7fffa2533000 rw-p 00000000 00:00 0 [stack]
7fffa25d4000-7fffa25d6000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)
On 2015-04-02 16:10, Dirk Zimoch wrote:
Hello Jan,
What is your terminator?
I tried to reproduce your problem but everything seems to work.
BTW: There are some other ways:
1. Use 3-state mbbi and %{off|on |INTERLOCK} format.
2. Use default value assignment (relatively new feature):
%?... does not fail on mismatch but results in 0. (or "" for string
formats).
in "get ch\$1 status\r\r\n = %?{off|on }%(\$2){INTERLOCK|}";
If the device sends "INTERLOCK", %?{off|on } results in 0 (Off) and
%(\$2){INTERLOCK|} in 1 (INTERLOCK)
If the device sends "off" or "on ", %(\$2){INTERLOCK|} results in 1 (Ok).
Dirk
On 01.04.2015 15:51, ruzickaj wrote:
Hi all,
I have a device that sends a response on command
"on/off" (requested value) or "INTERLOCK").
I use a @mismatch exception handler and redirection to record in
order to catch this "INTERLOCK" string. After that I turn on or off the
LED widget
(Interlocked or Non-Interlocked). When I started IOC it gave me a buffer
overflow.
Buffer overflow is appeared after adding arg: (\$2).
DB and proto file are following:
DB:
# requested value laser state
record(bi, "$(device):StatEnable")
{
field(DESC, "Laser Enabled")
field(DTYP, "stream")
field(INP, "@fibotecLtbis.proto
get_enable($(channel),$(device):StatEnableInterlock) $(port)")
field(SCAN, "1 second")
field(ZNAM, "Off")
field(ONAM, "On")
field(PINI,"YES")
}
#makro
#channel=1
#device=name:ch1
#
#Catching INTERLOCK message
record(bi, "$(device):StatEnableInterlock")
{
field(DESC, "Laser Enabled")
field(ZNAM, "INTERLOCK")
field(ONAM, "Ok")
field(VAL, "1")
field(PINI,"YES")
}
Proto file:
get_enable { out "get ch\$1 status"; in "get ch\$1 status\r\r\n =
%{off|on } ";
@mismatch {in "get ch\$1 status\r\r\n%(\$2){INTERLOCK}";}}
Thanks Jan
- Replies:
- Re: Stream device problem with redirection in @mismatch Dirk Zimoch
- References:
- Stream device problem with redirection in @mismatch ruzickaj
- Re: Stream device problem with redirection in @mismatch Dirk Zimoch
- Re: Stream device problem with redirection in @mismatch ruzickaj
- Navigate by Date:
- Prev:
Re: support for DTM-151? Jesus Vasquez
- Next:
Re: Stream device problem with redirection in @mismatch Dirk Zimoch
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Stream device problem with redirection in @mismatch ruzickaj
- Next:
Re: Stream device problem with redirection in @mismatch Dirk Zimoch
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|