bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Use opaque struct rather than char * in regex.h


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: [PATCH] Use opaque struct rather than char * in regex.h
Date: Tue, 03 Apr 2012 12:56:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120329 Icedove/10.0.3

Hello, all. It's a common problem when program attempts to access
unaligned pointer. On x86 this usually goes unnoticed but on other CPUs
it results in segmentation fault. -Wcast-align is a good way to check
that no such problem occurs. Unfortunately regex module breaks the
invariants by casting char * to a re_dfa_t *. Attached patch fixes it

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: align.diff
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]