Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
44990884
Unverified
Commit
44990884
authored
Apr 17, 2021
by
Stéphane Graber
Committed by
GitHub
Apr 17, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3790 from brauner/2021-04-15.fixes
lxc_clone & configure fix
parents
95dfbd42
3698c491
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
configure.ac
configure.ac
+6
-1
commands.c
src/lxc/commands.c
+2
-1
error_utils.h
src/lxc/error_utils.h
+3
-0
process_utils.c
src/lxc/process_utils.c
+3
-5
No files found.
configure.ac
View file @
44990884
...
...
@@ -467,10 +467,15 @@ if test "x$enable_sanitizers" = "xyes"; then
CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \
-fsanitize=address \
-fsanitize=undefined \
-f
sanitize=memory
\
-f
no-optimize-sibling-calls
\
-fno-omit-frame-pointer])
AC_SUBST(AM_CFLAGS)
CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[ \
-fsanitize=address])
AC_SUBST(AM_LDFLAGS)
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
...
...
src/lxc/commands.c
View file @
44990884
...
...
@@ -286,7 +286,8 @@ static ssize_t lxc_cmd_rsp_recv(int sock, struct lxc_cmd_rr *cmd)
}
return
syserror_set
(
-
ENOMEM
,
"Failed to receive response for command
\"
%s
\"
"
,
cur_cmdstr
);
case
LXC_CMD_CONSOLE_LOG
:
/* data */
__data
=
zalloc
(
rsp
->
datalen
+
1
);
if
(
rsp
->
datalen
>
0
)
__data
=
zalloc
(
rsp
->
datalen
+
1
);
rsp
->
data
=
__data
;
break
;
default:
/* catch any additional command */
...
...
src/lxc/error_utils.h
View file @
44990884
...
...
@@ -4,6 +4,9 @@
#define __LXC_ERROR_UTILS_H
#include <stdbool.h>
#include "macro.h"
#define MAX_ERRNO 4095
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
...
...
src/lxc/process_utils.c
View file @
44990884
...
...
@@ -146,14 +146,12 @@ int lxc_raw_pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
#define __LXC_STACK_SIZE (8 * 1024 * 1024)
pid_t
lxc_clone
(
int
(
*
fn
)(
void
*
),
void
*
arg
,
int
flags
,
int
*
pidfd
)
{
__do_free
void
*
stack
=
NULL
;
pid_t
ret
;
void
*
stack
;
stack
=
malloc
(
__LXC_STACK_SIZE
);
if
(
!
stack
)
{
SYSERROR
(
"Failed to allocate clone stack"
);
return
-
ENOMEM
;
}
if
(
!
stack
)
return
syserror_set
(
-
ENOMEM
,
"Failed to allocate clone stack"
);
#ifdef __ia64__
ret
=
__clone2
(
fn
,
stack
,
__LXC_STACK_SIZE
,
flags
|
SIGCHLD
,
arg
,
pidfd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment