summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-03-14 13:08:00 +0000
committerdim <dim@FreeBSD.org>2015-03-14 13:08:00 +0000
commit49820c9622102284e7ebb0dfd5599d53dce6571c (patch)
treed0e744ecfd1d272dd31501aae2c1ef4fa77a13f8 /lib
parentd6cbc26f7849e837bc29f43ea2b6d0a007ac4204 (diff)
parent470fe38d1f7205106865f5e7622c7a08d45eb0a2 (diff)
downloadFreeBSD-src-49820c9622102284e7ebb0dfd5599d53dce6571c.zip
FreeBSD-src-49820c9622102284e7ebb0dfd5599d53dce6571c.tar.gz
Merge ^/head r279893 through r279984.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/posix1e/acl_calc_mask.c1
-rw-r--r--lib/libc/posix1e/acl_strip.c14
-rw-r--r--lib/libcompiler_rt/Makefile6
-rw-r--r--lib/libproc/proc_sym.c2
-rw-r--r--lib/libstand/Makefile2
-rw-r--r--lib/libstand/dosfs.c3
6 files changed, 21 insertions, 7 deletions
diff --git a/lib/libc/posix1e/acl_calc_mask.c b/lib/libc/posix1e/acl_calc_mask.c
index a2d1527..56215b9 100644
--- a/lib/libc/posix1e/acl_calc_mask.c
+++ b/lib/libc/posix1e/acl_calc_mask.c
@@ -104,6 +104,7 @@ acl_calc_mask(acl_t *acl_p)
/* if no mask exists, check acl_cnt... */
if (acl_int_new->acl_cnt == ACL_MAX_ENTRIES) {
errno = ENOMEM;
+ acl_free(acl_new);
return (-1);
}
/* ...and add the mask entry */
diff --git a/lib/libc/posix1e/acl_strip.c b/lib/libc/posix1e/acl_strip.c
index ae37b38..85dfb47 100644
--- a/lib/libc/posix1e/acl_strip.c
+++ b/lib/libc/posix1e/acl_strip.c
@@ -82,8 +82,10 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask)
have_mask_entry = 0;
acl_new = acl_init(ACL_MAX_ENTRIES);
- if (acl_new == NULL)
+ if (acl_new == NULL) {
+ acl_free(acl_old);
return (NULL);
+ }
tag = ACL_UNDEFINED_TAG;
/* only save the default user/group/other entries */
@@ -94,16 +96,16 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask)
assert(_entry_brand(entry) == ACL_BRAND_POSIX);
if (acl_get_tag_type(entry, &tag) == -1)
- return (NULL);
+ goto fail;
switch(tag) {
case ACL_USER_OBJ:
case ACL_GROUP_OBJ:
case ACL_OTHER:
if (acl_get_tag_type(entry, &tag) == -1)
- return (NULL);
+ goto fail;
if (acl_get_permset(entry, &perm) == -1)
- return (NULL);
+ goto fail;
if (acl_create_entry(&acl_new, &entry_new) == -1)
return (NULL);
if (acl_set_tag_type(entry_new, tag) == -1)
@@ -120,6 +122,10 @@ _posix1e_acl_strip_np(const acl_t aclp, int recalculate_mask)
default:
break;
}
+fail:
+ acl_free(acl_new);
+ acl_free(acl_old);
+ return (NULL);
}
assert(_acl_brand(acl_new) == ACL_BRAND_POSIX);
diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile
index 659f9e1..a237399 100644
--- a/lib/libcompiler_rt/Makefile
+++ b/lib/libcompiler_rt/Makefile
@@ -56,12 +56,18 @@ SRCF= absvdi2 \
fixdfti \
fixsfdi \
fixsfti \
+ fixtfdi \
+ fixtfsi \
+ fixtfti \
fixunsdfdi \
fixunsdfsi \
fixunsdfti \
fixunssfdi \
fixunssfsi \
fixunssfti \
+ fixunstfdi \
+ fixunstfsi \
+ fixunstfti \
fixunsxfdi \
fixunsxfsi \
fixunsxfti \
diff --git a/lib/libproc/proc_sym.c b/lib/libproc/proc_sym.c
index 5c5ac55..dd52638 100644
--- a/lib/libproc/proc_sym.c
+++ b/lib/libproc/proc_sym.c
@@ -91,7 +91,7 @@ find_dbg_obj(const char *path)
snprintf(dbg_path, sizeof(dbg_path),
"/usr/lib/debug/%s.debug", path);
fd = open(dbg_path, O_RDONLY);
- if (fd > 0)
+ if (fd >= 0)
return (fd);
else
return (open(path, O_RDONLY));
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 4a1fa2c..a5a135f 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -28,7 +28,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
CFLAGS.gcc+= -mpreferred-stack-boundary=2
.endif
.if ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -fPIC
+CFLAGS+= -fPIC -mno-red-zone
.endif
.if ${MACHINE} == "pc98"
CFLAGS+= -Os
diff --git a/lib/libstand/dosfs.c b/lib/libstand/dosfs.c
index 72205a2..b75d752 100644
--- a/lib/libstand/dosfs.c
+++ b/lib/libstand/dosfs.c
@@ -786,7 +786,8 @@ static int
ioget(struct open_file *fd, u_int lsec, void *buf, u_int nsec)
{
int err;
-
+
+ twiddle(1);
if ((err = (fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec,
secbyt(nsec), buf, NULL)))
return(err);
OpenPOWER on IntegriCloud