program x
character(len=1024) :: foo
integer:: ret
foo = 'ls'
call system(foo, ret)
end program
该程序在 ifort 上与 SIGSEGV 一起崩溃。
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
a.out 0000000100000F0B Unknown Unknown Unknown
a.out 0000000100000EAA Unknown Unknown Unknown
a.out 0000000100000E8B Unknown Unknown Unknown
a.out 0000000100000E0C Unknown Unknown Unknown
a.out 0000000100000DA4 Unknown Unknown Unknown
数据库:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x0000000100000f0a in allocCstr ()
(gdb) bt
#0 0x0000000100000f0a in allocCstr ()
#1 0x0000000100000eaa in system_ ()
#2 0x0000000100000e0c in main ()
ifort--版本
ifort (IFORT) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
这是错误还是功能?