Skip to content

Commit

Permalink
big integer & signed integer bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchan0321 committed Aug 12, 2015
1 parent 66f29b5 commit 6008a1a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -542,4 +542,10 @@ $Id: RELEASE,v 1.68 2012/06/10 07:38:48 mit-sato Exp $
methods.c / global.[ch]
Fix String::fmt if some arguments are omitted, replace to null string ("").

2015/08/12:
type.c
Fix signed integer into big integer type bug.
lib/slist.prfm
Fix display address bug.

#eof
6 changes: 3 additions & 3 deletions cstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ sig_cstack_running_handler(int flag, siginfo_t* siginfo, void* ptr) {
fprintf(stderr, "si_pid: %d\n", siginfo->si_pid);
fprintf(stderr, "si_uid: %d\n", siginfo->si_uid);
fprintf(stderr, "si_status: %d\n", siginfo->si_status);
/* fprintf(stderr, "si_addr: %016x\n", siginfo->si_addr); */
/* fprintf(stderr, "si_value: %d\n", siginfo->si_value); */
/* fprintf(stderr, "si_reason: %d\n", siginfo->_reason._fault._trapno); */
fprintf(stderr, "si_addr: %016lx\n", (long int)siginfo->si_addr);
fprintf(stderr, "si_value: %d\n", siginfo->si_value.sival_int);
fprintf(stderr, "si_reason: %d\n", siginfo->_reason._fault._trapno);
if (CStack_in_baria) {
fprintf(stderr, "SOVF Double fault detect.\n");
exit(1);
Expand Down
8 changes: 4 additions & 4 deletions lib/slist.prfm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ defun slist () {
$l,1 each do: {| f |
println ["%3d %-4!v %016x %016x %016x %016x %1d" fmt
$i $f,0
[$f,1 && 0xffffffff]
[$f,2 && 0xffffffff]
[$f,3 && 0xffffffff]
[$f,4 && 0xffffffff]
$f,1
$f,2
$f,3
$f,4
$f,5
];
$i ++;
Expand Down
2 changes: 1 addition & 1 deletion types.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ new_integer(mpz_t integer) {
}

Toy_Type*
new_integer_si(int integer) {
new_integer_si(long int integer) {
mpz_t s;

mpz_init(s);
Expand Down
2 changes: 1 addition & 1 deletion types.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Toy_Type* list_next(Toy_Type *list);
Toy_Type* list_get_item(Toy_Type *list);
int list_length(Toy_Type *list);
Toy_Type* new_integer(mpz_t biginteger);
Toy_Type* new_integer_si(int integer);
Toy_Type* new_integer_si(long int integer);
Toy_Type* new_integer_d(double val);
char* integer_to_str(Toy_Type *val);
Toy_Type* new_real(double real);
Expand Down

0 comments on commit 6008a1a

Please sign in to comment.