[llvmlinux] [i586] Boot issues

Ghitulete Razvan razvan.ghitulete at gmail.com
Tue Oct 8 15:24:35 UTC 2013


Hi,

I tried to run the kernel with gdb, but due to some gdb issues. It runs
into a segmentation fault when trying to set a breakpoint on the llvm
compiled kernel symbols. But I managed to speed up the whole compile-boot
process by stripping down the config and using ccache so I think I found
the root of the problem. For whatever reason it seems that the clang
builtin_memcpy and builtin_memset crash. Although the symbols are defined
in clang, whenever the kernel attempts to do a memcpy (for example) the cpu
halts, which is consistent to an untreated hardware interrupt (i.e.
SIGSEGV,  SIGFPE).

I used the memcpy and memset from the llvmlinux patches which are usually
used in arch/x86/boot and it seems to do the trick for normal mem[cpy/set]
calls but, the issue still remains with structure operations which are
translated by the compiler into the `faulty` builtin ones.

Has this problem happened before? Are there any flags used that might [lead
to/avoid] this behaviour? I wrote a small test program to check if indeed
there is something general with the builtin memcpy/memset and they seem to
work just fine for said test program.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20131008/f00b7ba4/attachment.html>


More information about the LLVMLinux mailing list