Commit Graph

18 Commits

Author SHA1 Message Date
Meir Shpilraien (Spielrein)
a8c1253b6f
Fix Lua C API violation on lua msgpack lib. (#9832)
msgpack lib missed using lua_checkstack and so on rare
cases overflow the stack by at most 2 elements. This is a
violation of the Lua C API. Notice that Lua allocates
additional 5 more elements on top of lua->stack_last
so Redis does not access an invalid memory. But it is an
API violation and we should avoid it.

This PR also added a new Lua compilation option. The new
option can be enable using environment variable called
LUA_DEBUG. If set to `yes` (by default `no`), Lua will be
compiled without optimizations and with debug symbols (`-O0 -g`).
In addition, in this new mode, Lua will be compiled with the
`-DLUA_USE_APICHECK` flag that enables extended Lua C API
validations.

In addition, set LUA_DEBUG=yes on daily valgrind flow so we
will be able to catch Lua C API violations in the future.
2021-11-28 11:33:09 +02:00
Yossi Gottlieb
5f89c1d4f7
Handle cross-compiling when configuring jemalloc. (#9659) 2021-10-24 10:15:32 +03:00
Yoav Steinberg
9e5cd2cb26 Generate configure for Jemalloc 5.2.1.
./autogen.sh --with-version=5.2.1-0-g0
2021-10-10 18:29:13 +03:00
YoongHM
448c435b1b
Fix compilation warnings in Lua and jemalloc dependencies (#7785)
- The argument `u` in for `ar` is ignored (and generates warnings since `D` became the default.
  All it does is avoid updating unchanged objects (shouldn't have any impact on our build)
- Enable `LUA_USE_MKSTEMP` to force the use of `mkstemp()` instead of `tmpname()` (which is dead
  code in redis anyway).
- Remove unused variable `c` in `f_parser()`
- Removed misleadingly indented space in `luaL_loadfile()` and ``addfield()`

Co-authored-by: Oran Agra <oran@redislabs.com>
2020-09-29 17:10:54 +03:00
YoongHM
d3faed875d
Fix warning from jemalloc configure script (#7790)
jemalloc configure shows this:
    configure: WARNING: unrecognized options: --enable-cc-silence

The changelog of jemalloc 4.0 has:
  - Replace --enable-cc-silence with --disable-cc-silence to suppress spurious
    warnings by default.
2020-09-21 16:57:15 +03:00
filipe oliveira
21784def70
Extended redis-benchmark instant metrics and overall latency report (#7600)
A first step to enable a consistent full percentile analysis on query latency so that we can fully understand the performance and stability characteristics of the redis-server system we are measuring. It also improves the instantaneous reported metrics, and the csv output format.
2020-08-25 21:21:29 +03:00
Yossi Gottlieb
b087dd1db6 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00
antirez
fef42d0985 Add --with-version in Jemalloc config script. 2018-05-24 17:50:12 +02:00
antirez
eaa713e93b geohash.c and geohash_helper.c are part of Redis.
They were under /deps since they originate from a different source tree,
however at this point they are very modified and we took ownership of
both the files making changes, fixing bugs, so there is no upgrade path
from the original code tree.

Given that, better to move the code under /src with proper dependencies
and with a more simpler editing experience.
2016-07-06 16:02:38 +02:00
antirez
968e838417 Actually use --with-lg-quantum=3 to build jemalloc.
This change is documented in deps/README.md but was lost in one way or
the other, neutralizing the benefits of 24 bytes size classes (and
others).

Close #3208.
2016-05-18 11:59:14 +02:00
Matt Stancliff
7f4ac3d19c [In-Progress] Add Geo Commands
Current todo:
  - replace functions in zset.{c,h} with a new unified Redis
    zset access API.

Once we get the zset interface fixed, we can squash
relevant commits in this branch and have one nice commit
to merge into unstable.

This commit adds:
  - Geo commands
  - Tests; runnable with: ./runtest --single unit/geo
  - Geo helpers in deps/geohash-int/
  - src/geo.{c,h} and src/geojson.{c,h} implementing geo commands
  - Updated build configurations to get everything working
  - TEMPORARY: src/zset.{c,h} implementing zset score and zset
    range reading without writing to client output buffers.
  - Modified linkage of one t_zset.c function for use in zset.c

Conflicts:
	src/Makefile
	src/redis.c
2015-06-22 09:07:13 +02:00
Matt Stancliff
25e12d10be Set optional 'static' for Quicklist+Redis
This also defines REDIS_STATIC='' for building everything
inside src/ and everything inside deps/lua/.
2015-01-02 11:16:10 -05:00
Matt Stancliff
4fdcd213f0 Lua: Upgrade cjson to 2.1.0 (2012-03-01)
The new cjson has some improvements over our current version including
increased platform compatability, a new resource limit to restrict
decode depth, and better invalid number handling.

One minor change was required to deps/Makefile because this version
of cjson doesn't export itself globally, so we added a quick little
define of -DENABLE_CJSON_GLOBAL.

cjson now has an optional higher performing float parsing interface,
but we are not including it (g_fmt.c, dtoa.c) because it requires
endianness declaration during compile time.

This commit is exactly lua_cjson.c from 2.1.0 with one minor
change of altering the two Lua includes for local search
instead of system-wide importing.
2014-11-14 17:08:33 +01:00
Daniel Price
b57a4d07a2 Define AR to help with lua cross-compilation
Closes #997
2014-08-12 11:26:34 +02:00
Johan Bergström
ada7aa7ac9 Spaces to tabs 2013-03-16 18:35:20 +11:00
antirez
d36fb95a10 32 bit build fixed on Linux.
It failed because of the way jemalloc was compiled (without passing the
right flags to make, but just to configure). Now the same set of flags
are also passed to the make command, fixing the issue.

This fixes issue #744
2012-11-01 15:40:48 +01:00
Pieter Noordhuis
0a08d2b0e5 Clean up Makefiles
Remove unused variables. Instead of overriding non-standard variables
such as ARCH and PROF, use standard variables CFLAGS and LDFLAGS to
override Makefile settings. Move dependencies generated by `make dep` to
a separate file.
2012-04-11 11:24:17 +02:00
Pieter Noordhuis
4b8a63941d Rebuild deps/ and src/ when ARCH changes
This change moves the build instructions for dependencies to a separate
Makefile in deps/. The ARCH environment variable is stored in a
.make-arch file in the same directory as the Makefile. The contents of
this file is read and compared to the current ARCH, and, on a mismatch
triggers rebuilding the entire source tree.

When file .make-arch exists and matches with ARCH from the environment,
the dependencies are assumed to already be built.

The new "clean" target only cleans the Redis source tree, not its
dependencies. To clear the dependencies as well, the "distclean" target
can be used.
2011-11-15 12:41:35 -08:00