Ticket #2539 (closed defect: wontfix)

Opened 13 years ago

Last modified 13 years ago

On 64-bit struct vfs_s_super not aligned

Reported by: pavlinux Owned by:
Priority: minor Milestone: 4.8
Component: mc-vfs Version: master
Keywords: Cc: zaytsev
Blocked By: Blocking:
Branch state: Votes for changeset:

Description

Code highlighting:

/* Single connection or archive */
struct vfs_s_super
{
    struct vfs_class *me;
    struct vfs_s_inode *root;
    char *name;                 /* My name, whatever it means */
    int fd_usage;               /* Number of open files */
    int ino_usage;              /* Usage count of this superblock */
    int want_stale;             /* If set, we do not flush cache properly */

   //    HERE 4-byte HOLE :(

    void *data;                 /* This is for filesystem-specific use */
};

Attachments

align_struct_vfs_s_super.patch (750 bytes) - added by pavlinux 13 years ago.

Change History

Changed 13 years ago by pavlinux

comment:1 Changed 13 years ago by pavlinux

NOT Aligned:

      movq    $0, -48(%rbp) ; struct *
      movq    $0, -40(%rbp) ; struct *
      movq    $0, -32(%rbp) ; char *
      movl    $1, -24(%rbp) ; int
      movl    $2, -20(%rbp) ; int
      movl    $3, -16(%rbp) ; int = 8 byte :)
      movq    $0, -8(%rbp)  ; void *

Aligned:

      movq    $0, -48(%rbp) ; struct *
      movq    $0, -40(%rbp) ; struct *
      movq    $0, -32(%rbp) ; char *
      movq    $0, -24(%rbp) ; void *
      movl    $1, -16(%rbp) ; int
      movl    $2, -12(%rbp) ; int
      movl    $3, -8(%rbp)  ; int

comment:2 follow-up: ↓ 4 Changed 13 years ago by andrew_b

Not aligned... And what?

comment:3 Changed 13 years ago by andrew_b

  • Priority changed from major to minor
  • Version changed from 4.7.5 to master
  • Component changed from mc-core to mc-vfs

comment:4 in reply to: ↑ 2 Changed 13 years ago by pavlinux

Replying to andrew_b:

Not aligned... And what?

Come to an end the world and we all die. :)

comment:5 Changed 13 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to wontfix

comment:6 Changed 13 years ago by zaytsev

Come on, we could have put it in the cleanup... :-/

Last edited 13 years ago by zaytsev (previous) (diff)

comment:7 Changed 13 years ago by zaytsev

  • Cc zaytsev added

comment:8 Changed 13 years ago by pavlinux

That is, do you think that access to unaligned memory this is good?

Last edited 13 years ago by pavlinux (previous) (diff)

comment:9 follow-up: ↓ 10 Changed 13 years ago by zaytsev

What?

comment:10 in reply to: ↑ 9 Changed 13 years ago by pavlinux

Replying to zaytsev:

What?

Four byte hole between int want_stale and void *data;

comment:11 follow-up: ↓ 12 Changed 13 years ago by zaytsev

Oh, just say it in Russian. I don't understand your line of thinking. Andrew closed the ticket as wontfix, and I said that maybe we could have pushed this patch in the cleanup branch. Why you are asking me whether I think that unaligned memory access is good?!

comment:12 in reply to: ↑ 11 Changed 13 years ago by pavlinux

Replying to zaytsev:

... Andrew closed the ticket as wontfix, and
I said that maybe we could have pushed this patch in the cleanup branch. ...

Well, do as you like. ;)

Note: See TracTickets for help on using tickets.