Bugzilla – Attachment 73716 Details for
Bug 152115
wine crashes when ulimit -v is set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
perso.pat
perso.pat (text/plain), 1.74 KB, created by
Marcus Meissner
on 2006-03-17 16:08:37 UTC
(
hide
)
Description:
perso.pat
Filename:
MIME Type:
Creator:
Marcus Meissner
Created:
2006-03-17 16:08:37 UTC
Size:
1.74 KB
patch
obsolete
>Index: loader/preloader.c >=================================================================== >RCS file: /home/wine/wine/loader/preloader.c,v >retrieving revision 1.20 >diff -u -r1.20 preloader.c >--- loader/preloader.c 6 Feb 2006 13:35:58 -0000 1.20 >+++ loader/preloader.c 17 Mar 2006 15:36:21 -0000 >@@ -208,6 +208,14 @@ > return SYSCALL_RET(ret); > } > >+static inline int wld_personality( int perso ) >+{ >+ int ret; >+ __asm__ __volatile__( "pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx" >+ : "=a" (ret) : "0" (SYS_personality), "r" (perso) ); >+ return SYSCALL_RET(ret); >+} >+ > static inline ssize_t wld_read( int fd, void *buffer, size_t len ) > { > int ret; >@@ -226,6 +234,14 @@ > return SYSCALL_RET(ret); > } > >+static inline int wld_execve( const char * path, char **argv, char ** envp ) >+{ >+ int ret; >+ __asm__ __volatile__( "pushl %%ebx; movl %2,%%ebx; int $0x80; popl %%ebx" >+ : "=a" (ret) : "0" (SYS_execve), "r" (path), "c" (argv), "d" (envp) ); >+ return SYSCALL_RET(ret); >+} >+ > static inline int wld_mprotect( const void *addr, size_t len, int prot ) > { > int ret; >@@ -886,6 +902,7 @@ > ElfW(auxv_t) new_av[12], delete_av[3], *av; > struct wld_link_map main_binary_map, ld_so_map; > struct wine_preload_info **wine_main_preload_info; >+ unsigned int perso; > > pargc = *stack; > argv = (char **)pargc + 1; >@@ -894,6 +911,14 @@ > /* skip over the parameters */ > p = argv + *pargc + 1; > >+ perso = wld_personality(0xffffffff); >+ if (!(perso & 0x200000)) { >+ wld_personality(perso | 0x200000); >+ wld_execve(argv[0],argv,p); >+ fatal_error( "Failed execve %s\n", argv[0] ); >+ return NULL; >+ } >+ > /* skip over the environment */ > while (*p) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 152115
: 73716