From owner-dev-commits-src-main@freebsd.org Fri Jan 15 15:21:09 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CA9B4E8E5C; Fri, 15 Jan 2021 15:21:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHPys2S0sz55hX; Fri, 15 Jan 2021 15:21:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x336.google.com with SMTP id c124so7686998wma.5; Fri, 15 Jan 2021 07:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=r1DikPeAbbC61jncLgrYmI0v9n3QpuWFwXL1XFc5Pnw=; b=vDJR+Llfa/kTK+j904Si2/cpDQJ93J046GOAQiRgLS+4hNhfvjMq80ZMz0s8Jg+8Sn EiVpswsibLTSxpXkipkycN4uk9Pmi0j/ezNRviYjFPHOuZhfhmbVX4WZIDy0asw7aOFi esA/57s5uncKBpTRKDsNZWOrfau+e/IhuuaF8xgU7dXx01VJtScKfeA/X2AOh9mVLRUX deeDU2RG9CTOBqePP2c7EgciHtsG71s95fdcbgI8i7jzi/fLrAbU/5Cmc36zlC1SCWsc RDUy29y5lXdQ/6zSfy1b2eEo9/N+wX0/JsH3Ym8uO9tUxf9q9Y8SUPubIPAVj6zw112c ttoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=r1DikPeAbbC61jncLgrYmI0v9n3QpuWFwXL1XFc5Pnw=; b=e2loXO2xAirP1oeV7IPMFxzU+EsujA442AQ/e1IzvE1LTd4zpbYF+7VOBZEGee/H1k 6Yxi60MTCON34QP5KyUHLgqhOCZQRIzgN7ZR6AaD75F0LjjK0VkqDdH2PkG8QvTpXjW1 HuJ198wRjtFm4Kz0ZKhRLdHj4vckNNDQ0a8Dk7UhxzTNZXz4PjLUcTPjr/KozrdrPvD5 E4V5+u/t8j/VuaSq052/urZbFERgQqaZuQAKpECcsHEFebWQOkoRCj+7HXLolvYFZAS8 SR8dzALNSsa4TiuyD/aQUAttH8VZtdNf+a5qq9oKIeLDP451wOn+Jt0AkKhH6Y88XWk7 Q/AQ== X-Gm-Message-State: AOAM532MYLlKafxEY8Dq4yDxQExMDW/WSgZKHo8qMWPBKatvot2A7KD1 L+dHiRH81omJ83q45EG5qiJVEztrpNaKmuo7JfuLcjNl X-Google-Smtp-Source: ABdhPJzzf9taLJgiT/TmeJs1438dJJlwiinaktpvihKs4CMq951rwMHjqT78s3o6k2R3sMmIFbDTd8HxJr7rbB970s8= X-Received: by 2002:a7b:c773:: with SMTP id x19mr8991331wmk.127.1610724067313; Fri, 15 Jan 2021 07:21:07 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:f811:0:0:0:0:0 with HTTP; Fri, 15 Jan 2021 07:21:06 -0800 (PST) In-Reply-To: References: <202101140558.10E5wMNW079125@gitrepo.freebsd.org> From: Mateusz Guzik Date: Fri, 15 Jan 2021 16:21:06 +0100 Message-ID: Subject: Re: git: 0495ed398c4f - main - contrib/lua: update to 5.4.2 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Warner Losh Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DHPys2S0sz55hX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 15:21:09 -0000 I confirm this fixes it. On 1/15/21, Kyle Evans wrote: > On Fri, Jan 15, 2021 at 7:06 AM Mateusz Guzik wrote: >> >> There is some garbage shown by the boot loader since this commit. >> Screenshot from VirtualBox: >> https://people.freebsd.org/~mjg/loader_artifact.png >> >> An additional fixup is needed to see it: >> commit 0974bfa3a8da2201b0a415e72593552f5ac59379 (HEAD -> main, >> freebsd/main, freebsd/HEAD) >> Author: Toomas Soome >> Date: Fri Jan 15 14:58:12 2021 +0200 >> >> loader: do not update palette in text mode (real fix) >> >> otherwise the screen is blank. >> > > The patch below will fix it (assuming we're both looking at the > "Welcome to FreeBSD" misposition + leading garbage); there's clearly > an additional hack needed with Lua 5.4 to make sure that we don't get > a "float" (of course it's floored because we can't do floating point > here) from division, but this comes up so rarely that I'm not sure > it's worth specifically hacking around. Notably, below is the only > place that stock lualoader does arithmetic that results in a "float" > and, IMHO, it really should be a floor division like this anyways to > be more explicit that we're flooring it. > > I'll push something to fix it within a couple hours. CC imp@, I'm > leaning towards just pushing the below and not hacking lua further, > but a second opinion would be appreciated. > > diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua > index 3ace3884ff8..6062d7e87a0 100644 > --- a/stand/lua/drawer.lua > +++ b/stand/lua/drawer.lua > @@ -283,7 +283,7 @@ local function drawbox() > end > end > if menu_header_x == nil then > - menu_header_x = x + (w / 2) - (#menu_header / 2) > + menu_header_x = x + (w // 2) - (#menu_header // 2) > end > screen.setcursor(menu_header_x, y) > printc(menu_header) > -- Mateusz Guzik