Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Commit

Permalink
Added error message for issue #191 and reverted previous fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
hach-que committed Nov 12, 2012
1 parent ac78f8d commit 60862fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion libdcpu-ld/ldbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ void bin_info_remove(list_t* all, struct ldbin* bin, list_t* list, bool isAdjust
{
// Adjust the address stored in the entry down
// by the amount of words that were removed.
entry->address -= count;
// FIXME: This causes silent corruption (see issue #191).
//entry->address -= count;
}
}

Expand All @@ -537,6 +538,8 @@ void bin_info_remove(list_t* all, struct ldbin* bin, list_t* list, bool isAdjust

// Get the existing value of the adjustment.
word = (uint16_t*)list_get_at(&abin->words, entry->address);
if (word == NULL)
dhalt(ERR_BUG_191_WORKAROUND, NULL);
assert(word != NULL);

// Check to see if this adjustment entry is pointing into
Expand Down
3 changes: 2 additions & 1 deletion libdcpu/err.d
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ ERR_CALL_CONVENTION_UNKNOWN call-convention-unknown
ERR_CALL_MISSING_INTERRUPT_PARAMETERS call-missing-interrupt-parameters "the interrupt calling convention specified in the kernel is missing either interrupt-call() or interrupt-size() for '%s' and thus the required code can not be determined."
ERR_JUMPLIST_WITHOUT_KERNEL jumplist-without-kernel "you must be linking in kernel mode (-l kernel) in order to use the --jumplist parameter."
ERR_POLICY_WITH_KERNEL policy-with-kernel "you can not use the policy (-p) option when linking in kernel mode as it has no use."

ERR_BUG_191_WORKAROUND bug-191-workaround "avoided silent corruption during link stage (see GitHub issue #191)."

WARN_SKIPPING_SHORT_LITERALS_TYPE short-literals-skipped-type "skipped short literal compression due to target type."
WARN_SKIPPING_SHORT_LITERALS_REQUEST short-literals-skipped-request "skipped short literal compression on request."
WARN_KERNEL_NOT_PROVIDING_JUMP_LIST jump-list-missing "kernel did not specify a position to output a jump list with .JUMP."
Expand Down
4 changes: 2 additions & 2 deletions tool-errgen/lexer.l
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

%%

ERR_[A-Z_]+ yylval.word = strdup(yytext); return ERROR_DEF;
WARN_[A-Z_]+ yylval.word = strdup(yytext); return WARNING_DEF;
ERR_[A-Z0-9_]+ yylval.word = strdup(yytext); return ERROR_DEF;
WARN_[A-Z0-9_]+ yylval.word = strdup(yytext); return WARNING_DEF;
[a-z0-9-]+ yylval.word = strdup(yytext); return NAME;
<INITIAL>\" BEGIN(STRING);
<STRING>[^\"]* yylval.word = strdup(yytext); return MESSAGE;
Expand Down

0 comments on commit 60862fe

Please sign in to comment.