Waldemar Brodkorb писал 2018-10-20 18:16:
Hi, Александр Усов wrote,
Hello. I faced a problem I can't solve by myself so I will be grateful for any help. This code causes segfault:
I can not reproduce the segfault in Qemu. Are you using any special compiler flags?
uClibc is built by Buildroot. This is a buildroot config:
BR2_x86_i686=y BR2_ENABLE_DEBUG=y BR2_DEBUG_3=y # BR2_STRIP_strip is not set BR2_OPTIMIZE_G=y BR2_REPRODUCIBLE=y BR2_KERNEL_HEADERS_4_9=y BR2_TOOLCHAIN_BUILDROOT_WCHAR=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_ROOTFS_MERGED_USR=y BR2_TARGET_GENERIC_ROOT_PASSWD="root" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.93" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_PACKAGE_TESTS=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_GRUB2=y
I created a repo at https://github.com/aleksander/buildroot.git You can do 'make uclibc_segfault_test_defconfig; make all' to build an image and run 'test_uclibc_poll'.
best regards Waldemar