[coyotos-dev] BigNum.cxx buglet?
Jeroen Visser
jeroen.c.visser at gmail.com
Sun Sep 30 22:50:44 EDT 2007
Thomas,
I'm about to call it a day but... The images run on my 64-bit Ubuntu
with the following patches against the latest current:
diff -r d3dc47fbe797 src/ccs/mkimage/Makefile
--- a/src/ccs/mkimage/Makefile Sun Sep 30 20:54:41 2007 -0400
+++ b/src/ccs/mkimage/Makefile Sun Sep 30 14:25:14 2007 +0200
@@ -41,7 +41,7 @@ LIBCOYIMAGE=../libcoyimage/BUILD/libcoyi
LIBS+= $(LIBCOYIMAGE)
LIBS+= $(LIBSHERPA)
-LIBS+= -licuuc -lstdc++
+LIBS+= -lssl -licuuc -lstdc++
OBJECTS=\
$(BUILDDIR)/mkimage.o \
diff -r d3dc47fbe797 src/sys/coyotos/capidl.h
--- a/src/sys/coyotos/capidl.h Sun Sep 30 20:54:41 2007 -0400
+++ b/src/sys/coyotos/capidl.h Mon Oct 01 00:39:16 2007 +0200
@@ -33,7 +33,7 @@ typedef uint64_t errcode_t;
#define CAPIDL_U8(x) x##u
#define CAPIDL_U16(x) x##u
-#define CAPIDL_U32(x) x##ul
+#define CAPIDL_U32(x) (uint32_t)((long long)(x##ull & 0xFFFFFFFF))
#define CAPIDL_U64(x) x##ull
#define CAPIDL_I8(x) x
On 10/1/07, Thomas Stratmann <thomas.stratmann at rub.de> wrote:
> /usr/bin/ccache /coyotos/host/bin/i386-unknown-coyotos-gcc -g
> -finline-limit=3000 -fno-strict-aliasing -I../../../../../sys
> -I../../../../../sys/idl/BUILD/h -IBUILD -Wall -Winline -Wno-format
> -Wno-char-subscripts -Werror -c openrcv-data.c -o BUILD/openrcv-data.o
> cc1: warnings being treated as errors
> In file included from openrcv-data.c:3:
> ../../../../../sys/idl/BUILD/h/idl/coyotos/Cap.h: In Funktion
> »coyotos_Cap_destroy«:
> ../../../../../sys/idl/BUILD/h/idl/coyotos/Cap.h:255: Warnung:
> Ganzzahlkonstante ist zu groß für »unsigned long«-Typ
> ../../../../../sys/idl/BUILD/h/idl/coyotos/Cap.h:255: Warnung: Große
> Ganzzahl implizit auf vorzeichenlosen Typen abgeschnitten
> ../../../../../sys/idl/BUILD/h/idl/coyotos/Cap.h: In Funktion
> »coyotos_Cap_getType«:
> ../../../../../sys/idl/BUILD/h/idl/coyotos/Cap.h:401: Warnung:
> Ganzzahlkonstante ist zu groß für »unsigned long«-Typ
> ../../../../../sys/idl/BUILD/h/idl/coyotos/Cap.h:401: Warnung: Große
> Ganzzahl implizit auf vorzeichenlosen Typen abgeschnitten
> make[2]: *** [BUILD/openrcv-data.o] Fehler 1
> make[2]: Verlasse Verzeichnis
These are related to the CAPIDL_U32 macro being fed a 64-bit value.
> I'm afraid I am missing the understanding of implementation details to
> understand where this might come from. I put an assertion in
>
> BigNum::BigNum(size_t _nDigits, uint32_t* _digits, bool _negative)
>
> to catch BigNums being constructed with more than two effective digits,
> but it was not triggered.
I changed the macro to cast the value down to 32 bits. This is what
got me my limping Coyotos kernel.
More information about the coyotos-dev
mailing list