Re: Detecting Compilation Errors in Busybox Configurations

2013-05-14 Thread Christian Kästner

Hi,

mostly fixed, but I still get problems for init_transformer_aux_data and 
check_errors_in_children through archival/lib.c.


To reproduce make allnoconfig and activate CONFIG_GZIP, CONFIG_BZIP2, 
or CONFIG_LZOP.


(This one actually depends on deactivating 25 other options).



Best regards,
Christian



On 05/11/2013 08:36 PM, Denys Vlasenko wrote:

On Thursday 09 May 2013 22:57, Christian Kästner wrote:

Hi,

we just stumbled upon a configuration-related linker problem with
open_transformer.c that we previously accidentally as discarded false
positives.

Functions check_errors_in_children, xmalloc_open_zipped_read_close,
check_signature16,  init_transformer_aux_data, and open_transformer are
sometimes called in contexts where file open_transformer.c is not compiled.

The problem occurs if

undef CONFIG_FEATURE_COMPRESS_USAGE
undef CONFIG_FEATURE_SEAMLESS_XZ
undef CONFIG_MODINFO
undef CONFIG_FEATURE_SEAMLESS_BZ2
undef CONFIG_FEATURE_SEAMLESS_Z
undef CONFIG_RPM
undef CONFIG_GUNZIP
undef CONFIG_FEATURE_SEAMLESS_GZ
undef CONFIG_FEATURE_SEAMLESS_LZMA
undef CONFIG_INSMOD

and any of the following is activated:

CONFIG_UNXZ
CONFIG_BUNZIP2
CONFIG_UNCOMPRESS
CONFIG_FEATURE_COMPRESS_BBCONFIG
CONFIG_RPM2CPIO
CONFIG_UNZIP
CONFIG_DEPMOD
CONFIG_RMMOD
CONFIG_LSMOD
CONFIG_MAN
CONFIG_MODPROBE
CONFIG_FEATURE_2_4_MODULES
CONFIG_MODPROBE_SMALL
CONFIG_SETFONT


To reproduce the problem for example make allnoconfig and activate
CONFIG_UNXZ.


Thanks! Just fixed in current git, please try it and let me know
if anything is still broken.



___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[PATCH] grep: Don't bail out on first mismatch if '-w' option is set

2013-05-14 Thread Bartosz Golaszewski
This fixes bug 4520: 'grep -w fails when pattern is a strict substring
of a word'. If '-w' option is set - grep will retry to match against
the rest of the string after it finds a match not enclosed by delimiting
symbols.

Signed-off-by: Bartosz Golaszewski bartekg...@gmail.com
---
 findutils/grep.c |   25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/findutils/grep.c b/findutils/grep.c
index 70f3516..fe8dab8 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -312,10 +312,9 @@ static int grep_file(FILE *file)
smalluint found;
int linenum = 0;
int nmatches = 0;
-#if !ENABLE_EXTRA_COMPAT
-   char *line;
-#else
char *line = NULL;
+   char *lineptr = NULL;
+#if ENABLE_EXTRA_COMPAT
ssize_t line_len;
size_t line_alloc_len;
 # define rm_so start[0]
@@ -388,32 +387,36 @@ static int grep_file(FILE *file)
gl-matched_range.rm_so = 0;
gl-matched_range.rm_eo = 0;
 #endif
+   lineptr = line;
+ opt_w_again:
if (
 #if !ENABLE_EXTRA_COMPAT
-   regexec(gl-compiled_regex, line, 1, 
gl-matched_range, 0) == 0
+   regexec(gl-compiled_regex, lineptr, 
1, gl-matched_range, 0) == 0
 #else
-   re_search(gl-compiled_regex, line, 
line_len,
+   re_search(gl-compiled_regex, lineptr, 
line_len,
/*start:*/ 0, 
/*range:*/ line_len,
gl-matched_range) = 0
 #endif
) {
if (option_mask32  OPT_x) {
found = 
(gl-matched_range.rm_so == 0
- 
line[gl-matched_range.rm_eo] == '\0');
+ 
lineptr[gl-matched_range.rm_eo] == '\0');
} else
if (!(option_mask32  OPT_w)) {
found = 1;
} else {
char c = ' ';
if (gl-matched_range.rm_so)
-   c = 
line[gl-matched_range.rm_so - 1];
+   c = 
lineptr[gl-matched_range.rm_so - 1];
if (!isalnum(c)  c != '_') {
-   c = 
line[gl-matched_range.rm_eo];
-   if (!c || (!isalnum(c) 
 c != '_'))
+   c = 
lineptr[gl-matched_range.rm_eo];
+   if (!c || (!isalnum(c) 
 c != '_')) {
found = 1;
+   } else {
+   lineptr += 
gl-matched_range.rm_eo;
+   goto 
opt_w_again;
+   }
}
-//BUG: echo foop foo | grep -w foo should match, but doesn't:
-//we bail out on first mismatch because it's not a word.
}
}
}
-- 
1.7.10.4

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: [PATCH] grep: Don't bail out on first mismatch if '-w' option is set

2013-05-14 Thread Michael Tokarev
15.05.2013 01:01, Bartosz Golaszewski wrote:
 This fixes bug 4520: 'grep -w fails when pattern is a strict substring
 of a word'. If '-w' option is set - grep will retry to match against
 the rest of the string after it finds a match not enclosed by delimiting
 symbols.

It's been fixed by

commit 2f5b5beb28a3ffe9d12a19b79c453c640cee2f29
Author: Denys Vlasenko vda.li...@googlemail.com
Date:   Sun Jan 20 16:57:19 2013 +0100

grep: fix grep -Fw not respecting the -w option. Closes 5792

Apparently 4520 should have been fixed too at that time.

Thanks,

/mjt
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: [PATCH] grep: Don't bail out on first mismatch if '-w' option is set

2013-05-14 Thread Bartosz Gołaszewski
2013/5/14 Michael Tokarev m...@tls.msk.ru:
 15.05.2013 01:01, Bartosz Golaszewski wrote:
 This fixes bug 4520: 'grep -w fails when pattern is a strict substring
 of a word'. If '-w' option is set - grep will retry to match against
 the rest of the string after it finds a match not enclosed by delimiting
 symbols.

 It's been fixed by

 commit 2f5b5beb28a3ffe9d12a19b79c453c640cee2f29
 Author: Denys Vlasenko vda.li...@googlemail.com
 Date:   Sun Jan 20 16:57:19 2013 +0100

 grep: fix grep -Fw not respecting the -w option. Closes 5792

 Apparently 4520 should have been fixed too at that time.

 Thanks,

 /mjt

I pulled from current git and 'echo foop foo | ./busybox grep -w
foo' doesn't match,
although 'echo foop foo | ./busybox grep -Fw foo' does.

--
Best Regards,
Bartosz Gołaszewski
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Detecting Compilation Errors in Busybox Configurations

2013-05-14 Thread Denys Vlasenko
On Tuesday 14 May 2013 19:45, Christian Kästner wrote:
 Hi,
 
 mostly fixed, but I still get problems for init_transformer_aux_data and 
 check_errors_in_children through archival/lib.c.
 
 To reproduce make allnoconfig and activate CONFIG_GZIP, CONFIG_BZIP2, 
 or CONFIG_LZOP.
 
 (This one actually depends on deactivating 25 other options).

Fixed in git, thanks!
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: [PATCH] grep: Don't bail out on first mismatch if '-w' option is set

2013-05-14 Thread Denys Vlasenko
On Tuesday 14 May 2013 23:01, Bartosz Golaszewski wrote:
 This fixes bug 4520: 'grep -w fails when pattern is a strict substring
 of a word'. If '-w' option is set - grep will retry to match against
 the rest of the string after it finds a match not enclosed by delimiting
 symbols.

Applied, thanks!
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox