Permalink
Browse files

Fixes for bugs in shm:seek() and shm:read() found with Valgrind

read_number():
  Check B->unmanaged before breaking out of loop

read_all():
  Always initialize status variable
  • Loading branch information...
1 parent 65378d0 commit 6f4d6ae22bf6c944d34c7efea032680a9a1c10c0 @xolox committed Feb 11, 2011
Showing with 199 additions and 145 deletions.
  1. +4 −6 Makefile
  2. +3 −3 src/apr.lua
  3. +139 −94 src/buffer.c
  4. +44 −26 src/lua_apr.h
  5. +9 −16 src/shm.c
View
@@ -1,7 +1,7 @@
# This is the UNIX makefile for the Lua/APR binding.
#
# Author: Peter Odding <peter@peterodding.com>
-# Last Change: February 11, 2011
+# Last Change: February 12, 2011
# Homepage: http://peterodding.com/code/lua/apr/
# License: MIT
#
@@ -48,11 +48,6 @@ endif
# The build rules.
-default:
- make $(BINARY_MODULE)
- sudo make install
- make test
-
$(BINARY_MODULE): $(OBJECTS)
$(CC) -shared -o $(BINARY_MODULE) $(OBJECTS) $(LFLAGS)
@@ -77,6 +72,9 @@ uninstall:
test:
lua -lapr.test
+valgrind:
+ valgrind -q --track-origins=yes --leak-check=full lua -lapr.test
+
coverage:
[ -d etc/coverage ] || mkdir etc/coverage
rm -f src/errno.gcda src/errno.gcno
View
@@ -3,10 +3,10 @@
Lua source code for the Lua/APR binding.
Author: Peter Odding <peter@peterodding.com>
- Last Change: February 11, 2011
+ Last Change: February 12, 2011
Homepage: http://peterodding.com/code/lua/apr/
License: MIT
- Version: 0.13.2
+ Version: 0.13.3
This Lua script is executed on require("apr"), loads the binary module using
require("apr.core"), defines several library functions implemented on top of
@@ -15,7 +15,7 @@
--]]
local apr = require 'apr.core'
-apr._VERSION = '0.13.2'
+apr._VERSION = '0.13.3'
-- apr.md5(input [, binary]) -> digest {{{1
--
Oops, something went wrong.

0 comments on commit 6f4d6ae

Please sign in to comment.