Closed Bug 1203286 Opened 9 years ago Closed 8 years ago

Add support for ASan builds on Linux

Categories

(NSS :: Build, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(firefox43 affected)

RESOLVED DUPLICATE of bug 1233568
Tracking Status
firefox43 --- affected

People

(Reporter: tsmith, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached patch asan_support.patch (obsolete) — Splinter Review
I would like to add a USE_ASAN env variable that allows a user to easily create an Address Sanitizer build.
I think the most correct way to do this is to create a new build dir.

For example the build dir for a 32-bit debug build with pthreads on a Linux machine looks like this:
Linux3.16_x86_gcc_glibc_PTH_DBG.OBJ

I suggest something like this for ASan builds:
Linux3.16_ASAN_<arch>_<compiler>_<impl>_<build_type>.OBJ

I thought this was done by modifying line nspr/configure:8555
> RELEASE_OBJDIR_NAME="${OS_CONFIG}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"

To something like:
> RELEASE_OBJDIR_NAME="${OS_CONFIG}${SANITIZER}${CPU_ARCH_TAG}${COMPILER_TAG}${IMPL_STRATEGY}${OBJDIR_TAG}.${OBJDIR_SUFFIX}"

with the addition of this before that line:
> if test -n "$USE_ASAN"; then
>     SANITIZER=_ASAN
> fi

Note:
nspr/configure.in seems to have similar code.

I have tried making these changes and they had no effect that I could see. Not sure what I am doing wrong or if this is not the correct spot to make this change.
Attachment #8658901 - Attachment is obsolete: true
Depends on: 1239431
I didn't know this bug existed when I filed bug 1233568 and created my own work-in-progress patch for ASan support.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Attached patch create_dir.patchSplinter Review
Also how about adding something like this to create a separate directory for the builds? I think this makes sense because you may want to have ASan and non ASan debug builds and also in the future UBSan and MSan as well.

I don't know if this should like in arch.mak though
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: