No description
Find a file
Kir Kolyshkin 0367a1f6fe Drop prefix from own memcpy/memset/memcmp
C compiler might generate calls to memcpy, memset, memcmp, and memmove
as it seem fit (so far we haven't seen memmove being required). That
means we need to provide our own versions of it for code which is not
linked to a libc.

We already have a solution for that in commit bdf6051
("pie: provide memcpy/memcmp/memset for noglibc case")
but we faced another problem of compiler trying to optimize
our builtin_memset() by inserting calls to memset() which
is just an alias in our case and so it lead to infinite recursion.
This was workarounded in commit 8ea0ba7 ("string.h: fix memset
over-optimization with clang") but it's not clear that was a proper
fix.

This patch is considered to be the real solution. As we don't have
any other implementations of memset/memcpy/memcmp in non-libc case,
we can call ours without any prefixes and avoid using weak aliases.

Implementation notes:

1. mem*() functions code had to be moved from .h to .c for the functions
to be compatible with their prototypes declared in /usr/include/string.h
(i.e. "extern").

2. FORTIFY_SOURCE needed to be disabled for code not linked to libc,
because otherwise memcpy() may be replaced with a macro that expands
to __memcpy_chk() which of course can't be resolved during linking.

https://travis-ci.org/kolyshkin/criu/builds/198415449
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-02-06 13:29:54 +03:00
contrib scripts/install-debian-packages: add libnet-dev 2017-01-16 11:04:49 +03:00
coredump coredump: Rename dir to coredump 2016-06-28 13:04:58 +03:00
crit crit/decode: set default opts['nopl'] to False 2016-05-30 13:47:54 +03:00
criu Drop prefix from own memcpy/memset/memcmp 2017-02-06 13:29:54 +03:00
Documentation crtools: close a signal descriptor after passing a preparation stage 2017-02-03 16:55:07 +03:00
images protobuf: regenerate images on Makefile changes 2017-02-03 18:04:23 +03:00
include/common Drop prefix from own memcpy/memset/memcmp 2017-02-06 13:29:54 +03:00
lib py: Fix resp.errno access 2016-12-21 11:23:02 +03:00
scripts Drop prefix from own memcpy/memset/memcmp 2017-02-06 13:29:54 +03:00
soccr soccr: add one more test to check libsoccr_save/libsoccr_restore 2017-02-01 18:41:29 +03:00
test test: check exit codes for criu page-server 2017-02-03 18:04:17 +03:00
.gitignore soccr: Generate config.h dynamically 2017-01-16 11:03:42 +03:00
.mailmap repo: Add mailmap file 2012-03-25 23:31:20 +04:00
.travis.yml travis: enable arm/arm64/ppc builds with clang 2016-12-05 11:49:19 +03:00
COPYING COPYING: fix a typo in a preamble 2016-08-11 16:18:43 +03:00
CREDITS Add the CREDITS file 2012-07-30 13:52:37 +04:00
INSTALL.md Makefile.install: DESTDIR should be empty 2016-12-21 11:23:02 +03:00
Makefile build: only generate soccr config.h if necessary 2017-01-16 11:03:42 +03:00
Makefile.config make: Add .config file processing (v3) 2016-11-03 20:49:13 +03:00
Makefile.install Makefile.install: DESTDIR should be empty 2016-12-21 11:23:02 +03:00
Makefile.versions criu: Version 2.10 2017-01-16 12:06:01 +03:00
README.md Add ascciinema tour on basic criu features. 2016-06-16 16:37:06 +03:00

CRIU (Checkpoint and Restore in Userspace)

An utility to checkpoint/restore tasks. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space.

The project home is at http://criu.org.

Pages worth starting with are:

A video tour on basic CRIU features

CRIU introduction

How to contribute