wiki:Release/5/5.3

5.3 (closed)

Statistics

Total7
Fixed5
Invalid0
Works for me0
Duplicate0
Won't fix2

Distribution

defect

5 / 5

enhancement

2 / 2

Summary

#4408
RTEMS ARM Toolchain: armv8.0-m and armv8.1-m arch support
#4555
Remove aarch64 and microblaze from RSB on 5 branch
#4558
chmod problem in shell of RTEMS4.13/RTEMS5.1
#4559
ln command problem in shell of RTEMS4.13/5.1
#4564
close_editor problem of RTEMS4.13/5.1
#4565
medit malloc problem of RTEMS5.1
#4777
Deployed RSB does not find release version config

Details

Ticket Created Resolution Component Reporter Owner Modified
#4408 3 years ago wontfix admin Tigran Tadevosyan 16 months ago
Summary

RTEMS ARM Toolchain: armv8.0-m and armv8.1-m arch support

Description

Dear RTMES OS devel team,

The RTEMS ARM latest toolchain (based on v5.1 release) supports cortex-m7 which is using armv7-m architecture.

Are you planning to upgrade your toolchain version and add support for cortex-m33 and cortex-m55 CPUs which are using armv8.0-m and armv8.1-m architectures ?

Thank you.

Best Regards, Tigran

#4555 2 years ago fixed tool/rsb Ryan Long Joel Sherrill <joel@…> 13 months ago
Summary

Remove aarch64 and microblaze from RSB on 5 branch

Description

These tools don't have a port to RTEMS 5, so there's no reason for them to be on the 5 branch.

#4558 2 years ago fixed shell chenjin_zhong Chris Johns <chrisj@…> 13 months ago
Summary

chmod problem in shell of RTEMS4.13/RTEMS5.1

Description

Hi, I find one problem in rtems_shell_main_chmod function. the usage of this instruction is descripted as "chmod 0777 n1 n2... #change filemode", .the src code is listed as follows. the bold part should be replaced with chmod(argv[n], mode)?

static int rtems_shell_main_chmod(
  int argc,
  char *argv[]
)
{
  int           n;
  mode_t        mode;
  unsigned long tmp;

  if (argc < 2) {
    fprintf(stderr,"%s: too few arguments\n", argv[0]);
    return -1;
  }

  /*
   *  Convert arguments into numbers
   */
  if ( rtems_string_to_unsigned_long(argv[1], &tmp, NULL, 0) ) {
    printf( "Mode argument (%s) is not a number\n", argv[1] );
    return -1;
  }
  mode = (mode_t) (tmp & 0777);

  /*
   *  Now change the files modes
   */
  for (n=2 ; n < argc ; n++)
    chmod(argv[n++], mode); /* <<<< here */

  return 0;
}
#4559 2 years ago wontfix shell chenjin_zhong 13 months ago
Summary

ln command problem in shell of RTEMS4.13/5.1

Description

Hi, when I use ln -s /tmp/file in shell. Ithink the meaning of this instruction is to creates a symbolic link, which points to /tmp/file in current directory.But I find that the code implements this function is exit(linkit(globals, argv[0], ".", 1)). The src code of linkit function is listed as follows.

int linkit(rtems_shell_ln_globals* globals, const char *source, const char *target, int isdir).

if (isdir
(!lstat(source, &sb) && S_ISDIR(sb.st_mode))

(!hflag && !stat(source, &sb) && S_ISDIR(sb.st_mode))) {

if ((p = strrchr(target, '/')) == NULL)

p = target;

else

++p;

(void)snprintf(path, sizeof(path), "%s/%s", source, p); source = path;

} if ((*linkf)(target, source)) {

warn("%s", source); return (1);

}

As shown in black bold, variable source is a directory. Therefore, I think the target is argv[0]. the source is ".". Therefore, the code exit(linkit(globals, argv[0], ".", 1)) should be replaced with exit(linkit(globals, ".",argv[0], 1)).

#4564 2 years ago fixed shell chenjin_zhong Chris Johns <chrisj@…> 13 months ago
Summary

close_editor problem of RTEMS4.13/5.1

Description

Hi, I find when close editor in shell console.some errors will occur. I check and analyse the source code of medit.c. the code fragment is listed as follows.

#if defined(rtems)

case ctrl('w'): ed = ed->env->current; close_editor(ed); break;

#else

case ctrl('w'): close_editor(ed); ed = ed->env->current; break;

#endif

static void close_editor(struct editor *ed) {

struct env *env = ed->env; if (ed->dirty) {

display_message(ed, "Close %s without saving changes (y/n)? ", ed->filename); if (!ask()) {

ed->refresh = 1; return;

}

}

delete_editor(ed);

ed = env->current; if (!ed) {

ed = create_editor(env); new_file(ed, "");

} ed->refresh = 1;

}

static void delete_editor(struct editor *ed) {

if (ed->next == ed) {

ed->env->current = NULL;

} else {

ed->env->current = ed->prev;

} ed->next->prev = ed->prev; ed->prev->next = ed->next; if (ed->start) free(ed->start);

clear_undo(ed);

free(ed);

}

as seen above, if the macro rtems is defined. the delete_editor function will free ed pointer. Therefore, after the next loop, the ed is an invalid pointer.I have checked the code of https://github.com/ringgaard/sanos/blob/master/src/utils/edit/edit.c. the code is as follows.

case ctrl('w'): close_editor(ed); ed = ed->env->current; break;

#4565 2 years ago fixed shell chenjin_zhong Chris Johns <chrisj@…> 13 months ago
Summary

medit malloc problem of RTEMS5.1

Description

I find malloc function is called by move_gap function in medit.c. The returned value does not check. At least 32KB of memory is allocated at each time, maybe more than. The returned value "start" should be check to avoid malloc failure. The move_gap function should return immediatelty when malloc failure. the code frament is listed as follows.

static void move_gap(struct editor *ed, int pos, int minsize) {

int gapsize = ed->rest - ed->gap; unsigned char *p = text_ptr(ed, pos); if (minsize < 0) minsize = 0; if (minsize <= gapsize) {

if (p != ed->rest) {

if (p < ed->gap) {

memmove(p + gapsize, p, ed->gap - p);

} else {

memmove(ed->gap, ed->rest, p - ed->rest);

} ed->gap = ed->start + pos; ed->rest = ed->gap + gapsize;

}

} else {

int newsize; unsigned char *start; unsigned char *gap; unsigned char *rest; unsigned char *end;

if (gapsize + MINEXTEND > minsize) minsize = gapsize + MINEXTEND; newsize = (ed->end - ed->start) - gapsize + minsize; start = (unsigned char *) malloc(newsize); TODO check for out of memory gap = start + pos; rest = gap + minsize; end = start + newsize;

if (p < ed->gap) {

memcpy(start, ed->start, pos); memcpy(rest, p, ed->gap - p); memcpy(end - (ed->end - ed->rest), ed->rest, ed->end - ed->rest);

} else {

memcpy(start, ed->start, ed->gap - ed->start); memcpy(start + (ed->gap - ed->start), ed->rest, p - ed->rest); memcpy(rest, p, ed->end - p);

}

free(ed->start); ed->start = start; ed->gap = gap; ed->rest = rest; ed->end = end;

}

#ifdef DEBUG

memset(ed->gap, 0, ed->rest - ed->gap);

#endif

}

#4777 15 months ago fixed tool/rsb Chris Johns Chris Johns 15 months ago
Summary

Deployed RSB does not find release version config

Description

The RSB does not find the VERSION file when released.

Last modified on 02/14/23 at 05:41:09 Last modified on 02/14/23 05:41:09