Compilation issue with gfb594ca

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kandrc
    Swordsman
    • Dec 2007
    • 299

    Compilation issue with gfb594ca

    I've been away from the game since early in the year. Did a pull this morning and then rebuilt.

    The build generated a number of warnings. I'm using gcc 8.2.0 which has some new (or new-ish, I was previously using gcc 4.1) warnings about fall-throughs in switches. The warnings can be suppressed with a comment, "/* fall through */", where fall-throughs are desired. Here are the locations where I had to add them to get a clean compile:

    Code:
    effects.c:4805:                /* fall through */
    obj-pile.c:535:                /* fall through */
    player-birth.c:790:                        /* fall through */
    ui-birth.c:1054:                                /* fall through */
    ui-target.c:1122:                                        /* fall through */
    I was a bit surprised that in effects.c I didn't need 4 separate comments.

    GCC 8 comes with many annoyances. In one of my projects, it complained about space for snprintf() when converting ints; it assumes that all int conversions require 11 bytes (negative 2.1 billion), while my ints were constrained to 2 bytes. Had to use a hideous set of pragmas to suppress the warnings.
  • kandrc
    Swordsman
    • Dec 2007
    • 299

    #2
    Just had this crash:

    Code:
    Program received signal SIGSEGV, Segmentation fault.
    0x000000000048b3b7 in tval_is_book_k (kind=0x0) at obj-tval.c:336
    336             switch (kind->tval) {
    (gdb) print kind
    $1 = (const struct object_kind *) 0x0
    (gdb) bt
    #0  0x000000000048b3b7 in tval_is_book_k (kind=0x0) at obj-tval.c:336
    #1  0x000000000047d047 in make_object (c=0xca3198, lev=38, good=true, 
        great=false, extra_roll=false, value=0x7fffffffd5fc, tval=25)
        at obj-make.c:1129
    #2  0x0000000000436ade in place_object (c=0xca3198, y=18, x=144, level=38, 
        good=true, great=false, origin=5 '\005', tval=25) at gen-util.c:465
    #3  0x000000000043194c in build_vault (c=0xca3198, y0=24, x0=154, v=0x99bcd8)
        at gen-room.c:1363
    #4  0x0000000000431b1f in build_vault_type (c=0xca3198, y0=66, x0=188, 
        typ=0x50905c "Medium vault (new)") at gen-room.c:1403
    #5  0x000000000043488e in build_medium_vault (c=0xca3198, y0=66, x0=188, 
        rating=0) at gen-room.c:2512
    #6  0x0000000000435f26 in room_build (c=0xca3198, by0=0, bx0=0, profile=..., 
        finds_own_space=true) at gen-room.c:3076
    #7  0x00000000004298f6 in modified_chunk (depth=35, height=66, width=188)
        at gen-cave.c:1720
    #8  0x0000000000429e42 in modified_gen (p=0x959aa8, min_height=0, min_width=0)
        at gen-cave.c:1825
    #9  0x0000000000424263 in cave_generate (p=0x959aa8, height=0, width=0)
        at generate.c:983
    #10 0x00000000004254af in prepare_next_level (c=0x764ea0 <cave>, p=0x959aa8)
        at generate.c:1350
    #11 0x0000000000421ec7 in run_game_loop () at game-world.c:1087
    ---Type <return> to continue, or q <return> to quit---
    #12 0x00000000004c047c in play_game (new_game=false) at ui-game.c:435
    #13 0x00000000004f96f4 in main (argc=1, argv=0x7fffffffdbb8) at main.c:528
    Also, running doesn't seem to work with the roguelike keyset (using X11 interface).

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9647

      #3
      Thanks for the reports. That crash looks like my fault; I'll have to chase down the precise problem, but the stack trace really helps.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      Working...
      😀
      😂
      🥰
      😘
      🤢
      😎
      😞
      😡
      👍
      👎