> On 2/5/2020 4:39 PM, Pallavi Kadam wrote:
> >
> >
> > On 2/5/2020 11:54 AM, Dmitry Kozlyuk wrote:  
> >> Crashes at argument parsing, WinDbg log attached.  
> > This patch works fine with meson=0.49.
> > I was able to execute the 'helloworld' app.
> >
> > When I tried to build with meson=0.52 it failed with the error:
> > [9/25] Linking target lib/librte_kvargs-20.0.dll.
> > FAILED: lib/librte_kvargs-20.0.dll
> > clang @lib/librte_kvargs-20.0.dll.rsp
> > clang: error: no such file or directory: '/OPT:REF'  
> 
> Fixed this error with the patch you sent before.
> were able to execute parsing:
> 
> $ ./build/examples/dpdk-helloworld.exe -l 4-8
> EAL: Detected 20 lcore(s)
> EAL: Detected 2 NUMA nodes
> hello from core 5
> hello from core 6
> hello from core 7
> hello from core 8
> hello from core 4
> 
> >
> > Not completely sure, if this could be the reason for the crash.  

The crash does not happen with any arguments, "-l 4-8" works fine as do
"-cf" and "-v", but "--log-level=eal:8" crashes reproducibly. I assume
application should not crash on invalid options, but report an error and exit.
For the reference, I applied your patchset to the latest dpdk:master.

Z:\>build\native\clang\examples\dpdk-helloworld.exe
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes

        OK, no lcores specified.

Z:\>build\native\clang\examples\dpdk-helloworld.exe -cf
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
hello from core 1
hello from core 2
hello from core 3
hello from core 0

        OK, 4 lcores enabled.

Z:\>build\native\clang\examples\dpdk-helloworld.exe -cf --log-level=eal:8

        Crash, WinDbg log attached to bug report.

Z:\>echo %errorlevel%
-1073741819

Z:\>

Attaching the build log, but I don't think it matters, it's something with
getopt implementation or it's use, judging by stack trace.

P.S. I can also see "--syslog" option in the help message, you should
probably hide it via #ifndef, as you did with said option handling.

-- 
Dmitry Kozlyuk
Z:\>ninja -C build\native\clang
ninja: Entering directory `build\native\clang'
[0/1] Regenerating build files.
The Meson build system
Version: 0.53.999
Source dir: \\10.0.2.4\qemu
Build dir: \\10.0.2.4\qemu\build\native\clang
Build type: native build
Program cat found: NO
Program more found: YES (C:\Windows\system32\more.COM)
Project name: DPDK
Project version: 20.02.0-rc1
C compiler for the host machine: clang (clang 9.0.1 "clang version 9.0.1 ")
C linker for the host machine: clang link 14.24.28316.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program cat found: NO
Program more found: YES (C:\Windows\system32\more.COM)
Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh 
\\10.0.2.4\qemu\config\../buildtools/symlink-drivers-solibs.sh)
Checking for size of "void *" : 8
Library m found: NO
Library numa found: NO
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libbsd found: NO (tried pkgconfig and cmake)
pcap-config found: NO
Run-time dependency pcap found: NO (tried pkgconfig and config-tool)
Compiler for C supports arguments -Wextra: YES (cached)
config\meson.build:202: WARNING: Consider using the built-in warning_level 
option instead of using "-Wextra".
Compiler for C supports arguments -Wcast-qual: YES (cached)
Compiler for C supports arguments -Wdeprecated: YES (cached)
Compiler for C supports arguments -Wformat-nonliteral: YES (cached)
Compiler for C supports arguments -Wformat-security: YES (cached)
Compiler for C supports arguments -Wmissing-declarations: YES (cached)
Compiler for C supports arguments -Wmissing-prototypes: YES (cached)
Compiler for C supports arguments -Wnested-externs: YES (cached)
Compiler for C supports arguments -Wold-style-definition: YES (cached)
Compiler for C supports arguments -Wpointer-arith: YES (cached)
Compiler for C supports arguments -Wsign-compare: YES (cached)
Compiler for C supports arguments -Wstrict-prototypes: YES (cached)
Compiler for C supports arguments -Wundef: YES (cached)
Compiler for C supports arguments -Wwrite-strings: YES (cached)
Compiler for C supports arguments -Wno-address-of-packed-member: YES (cached)
Compiler for C supports arguments -Wno-packed-not-aligned: NO (cached)
Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
Fetching value of define "__SSE4_2__" : 1 (cached)
Fetching value of define "__AES__" : 1 (cached)
Fetching value of define "__PCLMUL__" : 1 (cached)
Fetching value of define "__AVX__" : 1 (cached)
Fetching value of define "__AVX2__" : 1 (cached)
Fetching value of define "__AVX512F__" :  (cached)
Fetching value of define "__RDRND__" : 1 (cached)
Fetching value of define "__RDSEED__" : 1 (cached)
Program gen-pmdinfo-cfile.sh found: YES (sh 
\\10.0.2.4\qemu\buildtools\gen-pmdinfo-cfile.sh)
Program check-experimental-syms.sh found: YES (sh 
\\10.0.2.4\qemu\buildtools\check-experimental-syms.sh)
Program python3 found: YES (C:\Python\python.exe)
Program grep found: NO
Program findstr found: YES (C:\Windows\system32\findstr.EXE)
Compiler for C supports arguments -Wno-format-truncation: NO (cached)
Message: lib/librte_kvargs: Defining dependency "kvargs"
Checking for function "getentropy" : NO (cached)
Message: lib/librte_eal: Defining dependency "eal"
Program doxygen found: NO
Program sphinx-build found: NO
Library execinfo found: NO
Compiler for C supports arguments -Wno-format-truncation: NO (cached)
Configuring rte_build_config.h using configuration
Message:
=================
Libraries Enabled
=================

libs:
        kvargs, eal,

Message:
===============
Drivers Enabled
===============


Message:
=================
Content Skipped
=================

libs:

drivers:


Build targets in project: 8

Found ninja.EXE-1.9.0 at "C:\Program Files\Meson\ninja.EXE"
[8/25] Compiling C object 
lib/76b5a35@@rte_eal@sta/librte_eal_common_rte_option.c.obj.
In file included from ../../../lib/librte_eal/common/rte_option.c:5:
..\..\..\lib/librte_eal/windows/eal/include\getopt.h:117:1: warning: unused 
function 'warnx' [-Wunused-function]
warnx(const char *fmt, ...)
^
1 warning generated.
[9/25] Linking target lib/librte_kvargs-0.200.dll.
clang: warning: argument unused during compilation: '-pthread' 
[-Wunused-command-line-argument]
LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored
   Creating library lib\librte_kvargs.dll.a and object lib\librte_kvargs.dll.exp
[15/25] Compiling C object 
lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal.c.obj.
In file included from ../../../lib/librte_eal/windows/eal/eal.c:16:
In file included from ..\..\..\lib\librte_eal\common\eal_options.h:8:
..\..\..\lib/librte_eal/windows/eal/include\getopt.h:117:1: warning: unused 
function 'warnx' [-Wunused-function]
warnx(const char *fmt, ...)
^
1 warning generated.
[16/25] Compiling C object 
lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_thread.c.obj.
../../../lib/librte_eal/common/eal_common_thread.c:170:25: warning: unused 
parameter 'attr' [-Wunused-parameter]
                const pthread_attr_t *attr,
                                      ^
1 warning generated.
[17/25] Compiling C object 
lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_options.c.obj.
../../../lib/librte_eal/common/eal_common_options.c:263:10: warning: 'strerror' 
is deprecated: This function or variable may be unsafe. Consider using 
strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See 
online help for details. [-Wdeprecated-declarations]
                        path, strerror(errno));
                              ^
C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\ucrt\string.h:181:16: note: 'strerror' has been 
explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
               ^
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:311:55: 
note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vcruntime.h:301:47: 
note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
../../../lib/librte_eal/common/eal_common_options.c:317:1: warning: control 
reaches end of non-void function [-Wreturn-type]
}
^
In file included from ../../../lib/librte_eal/common/eal_common_options.c:15:
..\..\..\lib/librte_eal/windows/eal/include\getopt.h:117:1: warning: unused 
function 'warnx' [-Wunused-function]
warnx(const char *fmt, ...)
^
../../../lib/librte_eal/common/eal_common_options.c:107:20: warning: unused 
variable 'default_solib_dir' [-Wunused-variable]
static const char *default_solib_dir = RTE_EAL_PMD_PATH;
                   ^
../../../lib/librte_eal/common/eal_common_options.c:251:1: warning: unused 
function 'eal_plugindir_init' [-Wunused-function]
eal_plugindir_init(const char *path)
^
5 warnings generated.
[24/25] Linking target examples/dpdk-helloworld.exe.
clang: warning: argument unused during compilation: '-pthread' 
[-Wunused-command-line-argument]
LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored
[25/25] Linking target lib/librte_eal-0.200.dll.
clang: warning: argument unused during compilation: '-pthread' 
[-Wunused-command-line-argument]
LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored
   Creating library lib\librte_eal.dll.a and object lib\librte_eal.dll.exp

Reply via email to