Code Monkey home page Code Monkey logo

linux-syscall-support's People

Contributors

anjaneyan00 avatar frobtech avatar leizleiz avatar petar-jovanovic avatar petrhosek avatar vapier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

linux-syscall-support's Issues

i386: clone() asm clobbers too many registers w/-fsanitize=address

I've been compiling google breakpad with -fsanitize=address option for a while 
now but since I've updated my toolchain from gcc 4.8.3 to 4.9.1, it does not 
compile anymore with the AdressSanitizer flag.

The following error occurs :
./src/third_party/lss/linux_syscall_support.h: In member function 'bool 
google_breakpad::ExceptionHandler::GenerateDump(google_breakpad::ExceptionHandle
r::CrashContext*)':
./src/third_party/lss/linux_syscall_support.h:1828:74: error: 'asm' operand has 
impossible constraints
                            : "esp", "memory", "ecx", "edx", "esi", "edi");

I'm currently cross-compiling from windows using gcc 4.9.1 provided by 
SourceryCodebench toolchain

GoogleBreakpad is currently using r31, I've tried to update to r34 but the same 
error still occurs


Original issue reported on code.google.com by [email protected] on 9 Mar 2015 at 10:01

google-breakpad fails to build in thumb mode on ARM

to reproduce (on ChromeOS) do:
CFLAGS="-mthumb" CXXFLAGS="-mthumb" emerge-tegra2_seaboard google-breakpad

I'm sure it is simple enough to reproduce outside of ChromeOS.

The error given is:
armv7a-cros-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I./src  -I./src   -Wa
,-mimplicit-it=always -DVCSID=\"480a20a3d015744787a07023a17ef94d1305357c\" -O0 -
MT src/client/linux/handler/exception_handler.o -MD -MP -MF $depbase.Tpo -c -o s
rc/client/linux/handler/exception_handler.o src/client/linux/handler/exception_h
andler.cc &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from ./src/common/memory.h:44,
                 from src/client/linux/handler/exception_handler.cc:94:
./src/third_party/lss/linux_syscall_support.h: In function 'int sys_clone(int (*
)(void*), void*, int, void*, int*, void*, int*)':   
./src/third_party/lss/linux_syscall_support.h:2185: error: r7 cannot be used in 
asm here

The problem is that in thumb mode, r7 is used to store the frame-pointer.

Original issue reported on code.google.com by [email protected] on 19 Apr 2011 at 12:35

powerpc64: sys_mmap2 build fails due to only __NR_mmap being available

What steps will reproduce the problem?
1. Untar either coredumper or breakpad google projects
2. ./configure
3. make

What is the expected output?

It should compile

What do you see instead?

In file included from 
src/client/linux/crash_generation/crash_generation_client.cc:40:0:
./src/third_party/lss/linux_syscall_support.h: In function ‘void* 
sys_mmap2(void*, size_t, int, int, int, off_t)’:
./src/third_party/lss/linux_syscall_support.h:2793:18: error: ‘__NR_mmap2’ 
was not declared in this scope
         __sc_0 = __NR_##name
                  ^

More detailed output is attached.

What version of the product are you using?

I have tried and replicated this with current and older versions of both 
packages, which include the LSS headers as third party code.

On what operating system?

RHEL7.1 Power8 Processor

Please provide any additional information below.

I have attached the full output from the configure/make steps for both 
coredumper and breakpad.

I cannot grant access to the system, but I will be happy to add patches and 
test as often as required.


Original issue reported on code.google.com by [email protected] on 9 May 2015 at 11:08

Attachments:

Compilation error on arm64

There seems to be a missing keyword in the arm64 definitions:
linux_syscall_support.h:3937:54: error: unknown type name ‘kernel_sigset_t’
                        unsigned int, n, const struct kernel_timespec *, t,
                                                      ^
linux_syscall_support.h:2497:51: note: in definition of macro ‘_syscall5’
       type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4,     \

The attached patch fixes this.

Original issue reported on code.google.com by amanieu on 1 Aug 2014 at 11:41

Attachments:

Update MIPS support

While adding MIPS support to breakpad I came across a few problems with the 
current version of lss support:

* LSS_ERRNO may involve a function call so LSS_RETURN must preserve $v0 value
* syscall clobbers $25/t9
* __v0 needs "+r" constraint when it contains the system call number
* Simplified and made consistent the O32 versions of syscall5/syscall6
* __r7 needs "+r" constraint in clone syscall
* __r7/__v1 need "+r" constraint in pipe syscall


Original issue reported on code.google.com by [email protected] on 12 Apr 2012 at 8:43

Attachments:

MIPS compilation fails with Clang: invalid input constraint '0' in asm

What steps will reproduce the problem?

Build for MIPS using clang 3.5 (-target mipsel-linux-uclibc -march=mips32)

What is the expected output? What do you see instead?

./linux_syscall_support.h:2977:14: error: invalid input constraint '0' in asm
  LSS_INLINE _syscall1(void *,  brk,             void *,      e)
             ^
./linux_syscall_support.h:2596:27: note: expanded from macro '_syscall1'
        LSS_REG(4, arg1); LSS_BODY(type, name, "=r", "r"(__r4));              \
                          ^
./linux_syscall_support.h:2583:35: note: expanded from macro 'LSS_BODY'
                                : "0"(__v0), ##__VA_ARGS__                    \
                                  ^
./linux_syscall_support.h:2978:14: error: invalid input constraint '0' in asm
  LSS_INLINE _syscall1(int,     chdir,           const char *,p)
             ^
./linux_syscall_support.h:2596:27: note: expanded from macro '_syscall1'
        LSS_REG(4, arg1); LSS_BODY(type, name, "=r", "r"(__r4));              \
                          ^
./linux_syscall_support.h:2583:35: note: expanded from macro 'LSS_BODY'
                                : "0"(__v0), ##__VA_ARGS__                    \
                                  ^

(many more of the same follow)

What version of the product are you using? On what operating system?

r31.

Please provide any additional information below.

Clang bug: http://llvm.org/bugs/show_bug.cgi?id=21613
The following patch is suggested as a workaround:

Index: linux_syscall_support.h
===================================================================
--- linux_syscall_support.h (revision 31)
+++ linux_syscall_support.h (working copy)
@@ -2579,7 +2579,7 @@
     #define LSS_BODY(type,name,r7,...)                                        \
           register unsigned long __v0 __asm__("$2") = __NR_##name;            \
           __asm__ __volatile__ ("syscall\n"                                   \
-                                : "+r"(__v0), r7 (__r7)                       \
+                                : "=r"(__v0), r7 (__r7)                       \
                                 : "0"(__v0), ##__VA_ARGS__                    \
                                 : LSS_SYSCALL_CLOBBERS);                      \
           LSS_RETURN(type, __v0, __r7)
@@ -3742,7 +3742,7 @@
       register unsigned long __v1 __asm__("$3");
       register unsigned long __r7 __asm__("$7");
       __asm__ __volatile__ ("syscall\n"
-                            : "+r"(__v0), "=r"(__v1), "=r" (__r7)
+                            : "=r"(__v0), "=r"(__v1), "=r" (__r7)
                             : "0"(__v0)
                             : "$8", "$9", "$10", "$11", "$12",
                               "$13", "$14", "$15", "$24", "$25", "memory"); 

Original issue reported on code.google.com by [email protected] on 16 Jan 2015 at 11:29

Compilation failure for MIPS64: __NR_getdents64 is undefined

I'm using the Buildroot distribution (http://buildroot.busybox.net/) and I'm 
trying to build a filesystem for MIPS64 n64 LittleEndian with the package 
"google-breakpad" included.

This is snippet of the compilation error (the full build log is attached):

/home/test/autobuild/instance-2/output/host/usr/bin/mips64el-ctng_n64-linux-gnu-
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Werror=missing-braces 
-Werror=non-virtual-dtor -Werror=overloaded-virtual -Werror=reorder 
-Werror=sign-compare -Werror=unused-variable -Werror=vla -fPIC 
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pipe -Os  
-MT src/client/linux/handler/exception_handler.o -MD -MP -MF $depbase.Tpo -c -o 
src/client/linux/handler/exception_handler.o 
src/client/linux/handler/exception_handler.cc &&\
    mv -f $depbase.Tpo $depbase.Po
In file included from 
src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc:42:0:
./src/third_party/lss/linux_syscall_support.h: In function 'int 
sys_getdents64(int, kernel_dirent64*, int)':
./src/third_party/lss/linux_syscall_support.h:2324:55: error: '__NR_getdents64' 
was not declared in this scope
           register unsigned long __v0 __asm__("$2") = __NR_##name;            \
                                                       ^
./src/third_party/lss/linux_syscall_support.h:2356:9: note: in expansion of 
macro 'LSS_BODY'
         LSS_BODY(type, name, "=r", "r"(__r4), "r"(__r5), "r"(__r6));          \
         ^
./src/third_party/lss/linux_syscall_support.h:2758:14: note: in expansion of 
macro '_syscall3'
   LSS_INLINE _syscall3(int,     getdents64,      int,         f,
              ^
make[1]: *** 
[src/client/linux/minidump_writer/src_client_linux_linux_dumper_unittest_helper-
linux_dumper_unittest_helper.o] Error 1
make[1]: *** Waiting for unfinished jobs....

Original issue reported on code.google.com by [email protected] on 8 Jul 2014 at 3:46

Attachments:

linux syscall support contains arm conditional instructions that are not contained in an IT block

Conditional ARM instructions are not enclosed in IT blocks. This makes the 
assembly illegal in thumb mode:
{standard input}: Assembler messages:
{standard input}:274: Error: thumb conditional instruction should be in IT 
block -- `cmpne r1,#0'
{standard input}:275: Error: thumb conditional instruction should be in IT 
block -- `moveq r3,#-22'
Attached is a patch to fix this (untested).

Original issue reported on code.google.com by [email protected] on 26 Apr 2011 at 8:49

Attachments:

Invalid suffix on Literal with GCC 4.8 and C++11

What steps will reproduce the problem?
1. compile with GCC 4.8 and -std=gnu++11 

What is the expected output? What do you see instead?

Expected: No warnings. I see: "warning: invalid suffix on literal; C++11 
requires a space between literal and identifier [-Wliteral-suffix] "

What version of the product are you using? On what operating system?

GCC 4.8 on Windows

Please provide any additional information below.

Fix by adding spaces in:
 ..."SYS_SYSCALL_ENTRYPOINT"...
->
 ..." SYS_SYSCALL_ENTRYPOINT "...

Original issue reported on code.google.com by [email protected] on 3 Apr 2014 at 9:17

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.