**** BEGIN LOGGING AT Thu Aug 28 02:59:56 2008 Aug 28 03:00:08 yes, looking up the bug right now. Aug 28 03:00:14 but it is strange, because even if it only appears on big endian platforms, it is not an endianess problem ... Aug 28 03:00:37 awk is just using signed int instead of unsigned int on my router Aug 28 03:01:00 and(0x80000000,255) gives me 255 ... Aug 28 03:15:47 does awk operate on double for every number, internally ??!! Aug 28 03:19:57 ok, awk variables get converted to "long" when arithmetically anded Aug 28 03:20:16 editors/awk.c:2049 in busybox Aug 28 03:20:46 so, gcc must be using different signedness for little/bug endian platforms ... Aug 28 03:21:05 oops, not "bug endian" ... :-) Aug 28 03:21:44 wow, this could change a lot of thinks actually if the default was changed ... Aug 28 03:24:05 https://dev.openwrt.org/ticket/3012 (got distracted) Aug 28 03:24:58 Bartman007: thanks ! didn't look a lot before filling mine ... Aug 28 03:27:27 ok, the solution is "nice" Aug 28 03:28:00 but it is still a problem for me that awk operates on different type of variables on different platforms Aug 28 03:28:20 for me this is a awk bug, i.e. signedness should be explicit in those arithmetic functions Aug 28 03:28:43 furthermore, (long) conversion only happens on a few arithmetic expressions in awk.c Aug 28 03:29:33 and for me, when doing arithmetic, you do it on unsigned numbers, otherwise this is completely impracticable (does this word exist in english ?...) Aug 28 03:29:49 impractical Aug 28 03:29:57 ok, thanks :-) Aug 28 03:30:21 well, I would rather say for bitwise operations, than arithmetic Aug 28 03:30:51 is there some official awk spec ? Aug 28 03:31:03 oh, impractiable is a work too Aug 28 03:31:08 s/work/word/ Aug 28 03:31:27 http://www.gnu.org/manual/gawk/html_node/Basic-Data-Typing.html is not very helpfull on when are used signed/unsigned integers ... Aug 28 03:32:21 gawk isn't the only awk around Aug 28 03:32:35 yes Aug 28 03:32:45 so is there really a "reference" ? Aug 28 03:32:59 or is everyone doing what he wants ? Aug 28 03:34:07 http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html ? Aug 28 03:37:43 brb, testing my new build Aug 28 03:47:02 ipcalc.sh working nicely with the new awk ! Aug 28 03:47:22 still no dhcp though, i am investigating Aug 28 03:48:24 am I still here ? Aug 28 03:48:33 yep ! dhcp working ! (by wifi now) Aug 28 03:49:16 don't know why, I add to restart dnsmasq a second time after changing the config ... Aug 28 03:57:23 you are here Aug 28 04:12:49 freaking AG310 Aug 28 04:13:02 too many GPIO pins do too many interesting things Aug 28 04:15:05 aoz: you know what else has a lot of gpios? an ixdp425 dev board. Aug 28 04:15:23 I can believe it Aug 28 04:15:50 * aoz is going to have to dig through Linksys' source _again_ to see if there's anything Aug 28 04:16:05 at least the intel boards are somewhat documented Aug 28 04:23:25 what's supposed to be the default signedness of "long" ? Aug 28 04:39:22 benoar: signed Aug 28 04:39:49 sn9: are you sure ? Aug 28 04:40:16 yes Aug 28 04:40:20 little-endian platforms (which is the "default" on busybox, right ?) don't seem to do so Aug 28 04:40:29 s/busybox/openwrt/ Aug 28 04:40:33 it's signed Aug 28 04:40:39 always Aug 28 04:41:11 well, test "echo|awk '{print and(0x80000000,1)}'" on your router Aug 28 04:41:26 0x80000000 is unsigned, always Aug 28 04:41:50 yes, but awk internally convert it to "long" Aug 28 04:41:59 I mean, busybox awk Aug 28 04:42:03 you can't assume that Aug 28 04:42:34 assume what ? that it converts it to long ? well, it's in the code ... Aug 28 04:42:56 bitwise operations in busybox awk are casted to long ... Aug 28 04:43:41 could you test that on your system's gawk too ? Aug 28 04:43:46 I would like some more evidence Aug 28 04:44:37 btw, http://busybox.net/bugs/view.php?id=4774 Aug 28 04:46:16 blogic: broken again Aug 28 04:50:18 benoar: must be a gcc bug, because iirc, C defines "long" to be signed Aug 28 04:51:00 sn9: maybe, but as long is unsigned on little-endian plateform in openwrt, it may break a lot of things ... Aug 28 04:51:21 x86 is little-endian Aug 28 04:51:22 it would be a good test of standard-conformance for openwrt ! Aug 28 04:52:19 yes, but here endianness is not the issue, it is just that long appears to have different default signedness depending on the endianess of the platform Aug 28 04:53:24 the root of the problem would be to know where the "default" platform (little-endian arm ?) gets the default long signedness from Aug 28 05:01:08 anyway, if the bug is that gcc is not using the "good" signedness by default on some platform, so there is a bug in busybox too Aug 28 05:01:44 IF doing bitwise operations in awk should be done on unsigned longs Aug 28 05:02:07 of which I don't really know, because I can't find a reference anywhere Aug 28 05:02:43 the only "reference" I have is my gawk (big-endian ppc) which gives me 0 when doing print and(0x80000000, 1) Aug 28 05:02:57 could someone on x86 test that ? Aug 28 05:03:44 my gawk says 0 on x86 Aug 28 05:04:12 sn9: thanks Aug 28 05:04:44 I don't know how it is implemented Aug 28 05:05:02 but if it is to be the correct behavior, busybox must be corrected Aug 28 05:06:33 another problem is to know when does gcc change the default signedness of long Aug 28 05:06:51 do you know why it is different on ixp4xx and ar7, for example ? Aug 28 05:07:16 (result given by aoz on the other chan) Aug 28 05:51:40 in case anybody interested, here is a 2.6.26 bootlog on a wag54gp2: http://openwrt.pastebin.com/f4ca620a1 Aug 28 05:52:15 still the issue of it freezing at that point Aug 28 05:52:39 aoz: are you using mac80211 on yours? Aug 28 09:14:55 Weedy: specify Aug 28 11:30:30 nbd: do you have any ar7 devices yourself? Aug 28 11:32:53 concerning https://dev.openwrt.org/cgi-bin/trac.fcgi/ticket/3946 should I add a patch to busybox while waiting for upstream to be fixed ? Aug 28 11:33:02 I never made a patch for openwrt before ... Aug 28 11:33:37 is there any policy on patch number ? (i.e. there are a lot of files in patches/ for BB) Aug 28 11:33:59 they are applied in order Aug 28 11:36:03 ok, so I should apply manually the ones that affect the file I am modifying, patch it and diff it to a new patch with a number following the ones I applied, right ? Aug 28 11:36:32 quilt is the tool that does that automatically Aug 28 11:36:39 wait, the build dir is already patched ... so a diff from here should do it Aug 28 11:36:51 ok, thanks, I'll look at that Aug 28 11:53:09 sn9: it's available, but there is no wifi on this particular board Aug 28 12:13:45 nbd * r12420 /trunk/package/madwifi/files/lib/wifi/madwifi.sh: madwifi: only start hostapd when necessary Aug 28 12:14:21 nbd: do you have any ar7 devices yourself? Aug 28 12:15:54 yes, a few Aug 28 12:15:58 haven't tested ar7 lately, though Aug 28 12:16:14 would you be willing to do so? Aug 28 12:16:27 when i have time Aug 28 12:16:31 i currently have too much stuff to d Aug 28 12:17:09 you can start a build in the meantime Aug 28 12:17:26 with this patch against current trunk: http://openwrt.pastebin.com/fb95a81d Aug 28 12:18:21 not at the moment Aug 28 12:18:51 btw, pastebin mangles patches Aug 28 12:19:00 it eats "@@" Aug 28 12:19:31 didn't eat it here Aug 28 12:19:56 hmm, look for example at L5 Aug 28 12:22:19 xMff1: clicking the "download" link on the pastebin page fixes it Aug 28 12:24:04 ahh, didn't know that. kk now I know better Aug 28 12:24:29 * xMff1 is used to Ctrl-C, Ctrl-V ... Aug 28 12:24:58 blogic: im locked out of my home network again Aug 28 12:38:06 Weedy: can you try to find out whats wrong ? Aug 28 15:47:46 nbd * r12421 /trunk/package/madwifi/files/lib/wifi/madwifi.sh: madwifi: fix encryption type check Aug 28 15:48:08 * nbd slaps CIA-8 Aug 28 15:48:09 you're late! Aug 28 15:50:21 hmmm... slapping a defenseless, arguably retarded servant... Aug 28 15:50:23 hehe Aug 28 15:52:18 well, it deserved it ;) Aug 28 15:56:22 sure - that's what most abusers say Aug 28 15:57:23 * nbd will henceforth be known as 'bot abuser' Aug 28 15:58:31 * blogic hands nbd the kinky whip Aug 28 15:58:43 \o/ Aug 28 16:01:30 \o/~~~ <== more like it Aug 28 16:02:45 lol, he stole my whip Aug 28 16:41:09 * Bartman007 throws a brick at CIA Aug 28 16:41:44 oh, now bm007 wants the whip Aug 28 16:42:00 aoz: bricks are more effective than a whip Aug 28 16:42:32 though I suppose this isn't CIA's fault. the svn commit is still going, taking forever. Aug 28 16:42:50 tell google to implement crawler-delay.. Aug 28 16:43:54 * Bartman007 writes "don't be evil" on a brick and throws it through Google's window Aug 28 16:45:34 * aoz starts seeing "Brickman007" Aug 28 16:47:17 :D Aug 28 17:05:11 [florian]: ping? Aug 28 17:05:15 Hi folks, Aug 28 17:05:21 klapaucjusz? Aug 28 17:05:24 I'm attempting to flash a Fonera+ Aug 28 17:05:29 model 2201 Aug 28 17:05:45 No success so far -- appears to boot OpenWRT, then Aug 28 17:05:55 1. on the LAN port, answers to ARP but not to ping Aug 28 17:06:01 2. on the WAN port, complete silence. Aug 28 17:06:16 I'm compiling a fresher version right now, but I'm not optimistic. Aug 28 17:06:19 Anyone done that? Aug 28 17:06:39 wrt: yep. Aug 28 17:07:06 <[florian]> klapaucjusz: pong Aug 28 17:07:21 Hi [florian]. Aug 28 17:07:26 <[florian]> klapaucjusz: wrt is a bot do not answer to him ;) Aug 28 17:07:27 welcome to #openwrt-devel! Aug 28 17:07:53 wrt: I hail thee, o powerful bot. Aug 28 17:08:06 [florian]: so how do I get my SVN account? Aug 28 17:08:16 [florian]: have you seen my query about the Fon 2201? Aug 28 17:08:20 <[florian]> klapaucjusz: I already sent you an email about that, and so did Kaloz irrc Aug 28 17:08:34 <[florian]> klapaucjusz: yes I just saw it, and of course, without serial console this makes it harder to debug Aug 28 17:08:37 Oh, I'm just back from holidays, 400 mails to scan through. Aug 28 17:09:25 <[florian]> professors, you guys have too much holidays :p Aug 28 17:09:40 Salauds de fonctionnaires! Aug 28 17:09:46 <[florian]> eh eh Aug 28 17:09:57 <[florian]> how did you flash it ? Aug 28 17:11:18 telnet to 192.168.1.1 port 9000, then over tftp. Aug 28 17:11:34 (Yes, RedBoot is available over the network on this model.) Aug 28 17:12:00 <[florian]> allright, sounds good up to now Aug 28 17:12:54 I see https://dev.openwrt.org/cgi-bin/trac.fcgi/ticket/3767 Aug 28 17:13:33 <[florian]> klapaucjusz: I need to test this Aug 28 17:18:04 [florian]: you'll welcome to try it out on my Fonera+ if you want. Aug 28 17:18:12 s/you'll/you're/ Aug 28 17:29:32 is there a lot of french people here ? :-p Aug 28 17:30:11 agb * r12427 /trunk/package/busybox/patches/530-unsigned_bitwise_ops.patch: Aug 28 17:30:11 [busybox] Use unsigned longs for bitwise operations in awk, thanks benoar. Aug 28 17:30:11 - Resolves the ipcalc.sh bug on some arches, closes #3012, #3946 Aug 28 17:30:12 - Submitted upstream as busybox bug #4774 Aug 28 17:30:15 florian * r12426 /packages/utils/anyremote/Makefile: Upgrade anyremot to 4.7.1 (#3907) Aug 28 17:30:36 benoar: at least two ;-) Aug 28 17:31:32 benoar: keep on eye on them, if their numbers climb to three we are in trouble. Aug 28 17:32:22 somebody needs to balance the germans ;) might as well be the french Aug 28 17:33:41 thanks CIA-8 for applying it ! Aug 28 17:34:01 CIA-8 is a bot Aug 28 17:34:12 well, I'm french too ... Aug 28 17:34:19 agb is Bartman007 Aug 28 17:34:24 oops .... thanks agb then ! Aug 28 17:34:37 ok, so thanks Bartman007 Aug 28 17:35:14 ho, the "thanks" is in the log message ... I think I should sleep a little bit more Aug 28 17:35:35 I don't know what upstream will say about this patch Aug 28 17:35:43 hope it looks correct for them Aug 28 18:04:45 [florian]: Sorry for the false alarm Aug 28 18:04:54 With r12427, it appears to work fine. Aug 28 18:05:54 [florian]: i don't suppose you have any ar7 devices on which you can test a patch? Aug 28 20:56:35 blogic: does the your firewall pass the wan interface to firewall.user? Aug 28 20:56:44 the old script had $WAN Aug 28 22:05:08 ok, so openwrt toolchain for little-endian platform is broken Aug 28 22:05:34 sn9: you were right, long is always signed (no, I wasn't doubting :-)) Aug 28 22:06:01 so, bug hunt of the night : why does the LE toolchain use unsigned long by default Aug 28 22:06:14 does it come from openwrt ... or gcc ? Aug 28 22:07:04 (I think that in the end if it is gcc's fault I will stumble on something like "yes, the standard says so, but for some reason XXX we don't follow it" ...) Aug 28 22:07:56 benoar: my guess would be gcc Aug 28 22:11:51 sn9: well, I am always doubtfull about finding bugs in a so "big" project, but maybe it is it .... it is just that I am not used to this kind of ... (some of my english is missing) .... you know, the tree that hides the forest Aug 28 22:12:07 and I am not used to work on so "low level" things Aug 28 23:08:40 nbd: apparently, there's a newer file for ref on mirror2 Aug 28 23:35:32 nbd: you wanna put it up? Aug 29 00:37:41 blogic: dead? Aug 29 00:50:30 nice, signedness issue with awk has been committed upstream ! Aug 29 01:07:56 nbd * r12428 /trunk/package/madwifi/files/lib/wifi/madwifi.sh: revert accidental change to madwifi.sh Aug 29 01:11:33 nbd: well? Aug 29 01:11:48 no time Aug 29 01:12:00 i'm almost asleep already Aug 29 01:12:07 just for an upload to mirror2? Aug 29 01:12:10 just preparing some stuff for tomorrow Aug 29 01:38:26 does someone know if openwrt does something special to change the signedness of long on little-endian plateform ? (mipsel for example) Aug 29 01:39:07 why would it? Aug 29 01:39:25 I don't know ... Aug 29 01:39:32 you're pretty sure this lies in gcc ? Aug 29 01:40:10 reasonably so Aug 29 01:41:21 there must be some reason for that ... it can't have stayed so so long without anyone noticing Aug 29 01:41:43 any idea how long that was? Aug 29 01:41:51 do you have a clue where this is defined ? in the toolchain's headers ? Aug 29 01:41:59 nop Aug 29 01:42:19 it might be a relatively new bug Aug 29 01:42:24 I should look at when ipcalc.sh did the calculation this way Aug 29 01:44:05 well, last change to common.awk was 18 months ago Aug 29 01:44:33 so, if it has always been working, this gcc bug is at least 18 months old... Aug 29 01:45:10 the most common platform for openwrt is mipsel, right ? Aug 29 01:46:34 (searching for anything with "long" in google gives a lot of useless answers ...) Aug 29 01:50:30 do you know where "base" types are defined in gcc ? Aug 29 01:57:26 nope Aug 29 02:00:18 well, the other way it could have worked correctly on mpisel is if it had 64bits registers ... which is not the case Aug 29 02:00:48 (I write that to be sure that I am not mad .... it is 32bits, right ?!!!!!!!) Aug 29 02:02:25 there is such a thing as 64-bit mips Aug 29 02:02:41 yes, but not in routers ...? Aug 29 02:02:44 right Aug 29 02:11:33 I see no way the "long" could be used as unsigned long Aug 29 02:11:52 I am wondering if this is the exact cause of the "non-bug" on mipsel Aug 29 02:12:39 because, address calculation should definitly be buggy if gcc correctly compiled it Aug 29 02:13:00 ... the way it was before my patch Aug 29 02:13:51 I should go to sleep I think Aug 29 02:14:43 ... because I'm beginning to think to decompile busybox, and this could last a veeeeery long time Aug 29 02:17:16 could this be due to the ABI ? Aug 29 02:17:30 well, weired ABI ? Aug 29 02:26:04 I didn't even try my host's busybox Aug 29 02:26:08 it segfaults ... Aug 29 02:26:13 could some try : Aug 29 02:26:34 echo | busybox awk '{ print and(0x80000000,1) }' Aug 29 02:26:41 on its host ? (x86 I suppose) Aug 29 02:27:23 "buggy" busybox should print 1 Aug 29 02:27:39 and this is normal as long as you don't use BB svn from 1h ago Aug 29 02:27:47 but if it prints 0 .... wtf ? Aug 29 02:27:56 (gawk should print 0) **** ENDING LOGGING AT Fri Aug 29 02:59:58 2008