Re: malloc: micro optimizations

2023-10-25 Thread Masato Asou
Hi, It works fine for me. ok asou@ -- ASOU Masato From: Otto Moerbeek Date: Wed, 25 Oct 2023 11:04:01 +0200 > Hi, > > a few micro-optimization, including getting rid of some statistics > that are not actualy very interesting. > > Speedup amounts to a few tenths of percents to a few percents,

Re: malloc: more info in error message for write-after-free with option D

2023-10-22 Thread Masato Asou
Hi, I wanted an extension to malloc() that would report the caller of all memory leaks. It works fine for me! ok asou@ -- ASOU Masato From: Otto Moerbeek Date: Tue, 10 Oct 2023 12:39:00 +0200 > Hi, > > This diff adds better error reporting for write-after-free or the more > general write of

Re: Why store pointers for some functions in malloc.c?

2023-10-17 Thread Masato Asou
From: Otto Moerbeek Date: Wed, 18 Oct 2023 07:28:47 +0200 > On Wed, Oct 18, 2023 at 09:23:49AM +0900, Masato Asou wrote: > >> Hello tech@ and otto, >> >> Why do only some calling functions store the pinttes in region_info as >> below: >> >> static

Why store pointers for some functions in malloc.c?

2023-10-17 Thread Masato Asou
Hello tech@ and otto, Why do only some calling functions store the pinttes in region_info as below: static void * malloc_bytes(struct dir_info *d, size_t size, void *f) { found: if (i == 0 && k == 0 && DO_STATS) { struct region_info *r = find(d, bp->page);

Re: Significance of MALLOC_OPTIONS=G

2023-09-29 Thread Masato Asou
From: Otto Moerbeek Date: Fri, 29 Sep 2023 07:36:08 +0200 > In this caseof a single malloc call you'll get a page that is followed > by unmapped memory as the kernel does that. In general, that may not > happen though, depending on what happended previously (i.e. contents > of the caches used by

Re: Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
From: "Theo de Raadt" Date: Thu, 28 Sep 2023 21:43:47 -0600 > Our kernel also has the concept of guard-pages, meaning it will try to > keep a gap of 1 page between mmap() allocations. I didn't know about guard-pages feature. > The way it is coded, it isn't perfect, but it tends to work and >

Significance of MALLOC_OPTIONS=G

2023-09-28 Thread Masato Asou
I am investigating what problems can bt detected with MALLOC_OPTIONS. SEGV occurs even if MALLOC_OPTIONS=G is not specified. Normally, the areas allocated by malloc() are not contiguous. However, after many malloc() operations and not free() these areas, contiguous areas may be allocated. I

Re: malloc: add error message in putleakinfo

2023-09-08 Thread Masato Asou
From: Otto Moerbeek Date: Fri, 8 Sep 2023 13:39:53 +0200 > On Fri, Sep 08, 2023 at 10:08:28AM +0900, Masato Asou wrote: > >> From: Masato Asou >> Date: Fri, 08 Sep 2023 05:45:55 +0900 (JST) >> >> > There was a mistake in the diff. >> > >> >

Re: malloc: add error message in putleakinfo

2023-09-07 Thread Masato Asou
From: Masato Asou Date: Fri, 08 Sep 2023 05:45:55 +0900 (JST) > There was a mistake in the diff. > > From: Masato Asou > Date: Fri, 08 Sep 2023 05:33:23 +0900 (JST) > >> Hi, >> >> I have modified diff. comments, ok? >> >> $ MALLOC_OPTIONS=D

Re: malloc: add error message in putleakinfo

2023-09-07 Thread Masato Asou
There was a mistake in the diff. From: Masato Asou Date: Fri, 08 Sep 2023 05:33:23 +0900 (JST) > Hi, > > I have modified diff. comments, ok? > > $ MALLOC_OPTIONS=D ktrace -tu ./a.out 107349 > a.out(99781) in unknown(): putleakinfo(): Cannot allocate memory > -- >

Re: malloc: add error message in putleakinfo

2023-09-07 Thread Masato Asou
c__, + strerror(errno)); return; + } used = 0; } p = [used++]; From: Otto Moerbeek Date: Thu, 7 Sep 2023 12:43:04 +0200 > On Thu, Sep 07, 2023 at 06:

malloc: add error message in putleakinfo

2023-09-07 Thread Masato Asou
Hi, I am using MALLOC_OPTIONS=D and kdump report no information when malloc() exceeds 107350 bytes on my OpenBSD box. I have investigated and found that mmap() faild in putleakinfo(). I used the following program: #include #include #include #include #include int main(int argc, char

Add CXXOPTS in bsd.README

2023-07-25 Thread Masato Asou
Hi, I have added a description of CXXOPTS in bsd.README. comments, ok? -- ASOU Masato === RCS file: /cvs/src/share/mk/bsd.README,v retrieving revision 1.85 diff -u -p -r1.85 bsd.README --- share/mk/bsd.README 22 Sep 2020 10:31:46

remove extra parentheses

2023-07-11 Thread Masato Asou
Hi, ok ? -- ASOU Masato Index: lib/libc/sys/poll.2 === RCS file: /cvs/src/lib/libc/sys/poll.2,v retrieving revision 1.39 diff -u -p -r1.39 poll.2 --- lib/libc/sys/poll.2 21 Jan 2022 15:23:36 - 1.39 +++ lib/libc/sys/poll.2

Add parent to nvgre in ifconfig.8

2023-04-25 Thread Masato Asou
Tne interface of nvgre(4) has SIOC[SGD]IFPARENT as below from man nvgre: nvgre interfaces support the following ioctl(2) calls: SIOCSIFPARENT struct if_parent * Configure which interface will be joined to the multicast group specified by the tunnel

Add eoip keepalive in ifconfig.8

2023-04-24 Thread Masato Asou
The eoip interface has SIOC[SG]ETKALIVE as below: $ man eoip | grep KALIVE SIOCSETKALIVE struct ifkalivereq * SIOCGETKALIVE struct ifkalivereq * Can I append eoip to keepalive option? comment, ok? -- ASOU Masato Index: sbin/ifconfig/ifconfig.8

Add -pweneighbor to ifconfig.8

2023-04-20 Thread Masato Asou
The ifconfig command has -pweneighbor option. However, it is not described in the manual ifconfig.8. comment, ok? -- ASOU Masato Index: sbin/ifconfig/ifconfig.8 === RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v retrieving revision

Re: delete pltime and vltime

2023-04-20 Thread Masato Asou
From: Florian Obser Date: Wed, 12 Apr 2023 14:45:10 +0200 I had overlooked SIOCAIFADDR_IN6. > On 2023-04-12 20:13 +09, Masato Asou wrote: >> Hi, >> >> SIOCSIFALIFETIME_IN6 has been removed from sys/netinet6/in6_var.h with >> the fol

delete pltime and vltime

2023-04-12 Thread Masato Asou
Hi, SIOCSIFALIFETIME_IN6 has been removed from sys/netinet6/in6_var.h with the following commit: commit f487585d711456156cf95432fac5a11ff78440c8 Author: stefan Date: Sun Feb 28 07:15:34 2016 + Remove SIOCSIFALIFETIME_IN6 ioctl, as NetBSD did. As described in NetBSD

Delete TAB only line

2023-01-25 Thread Masato Asou
ok? Index: etc/rc === RCS file: /cvs/src/etc/rc,v retrieving revision 1.569 diff -u -p -r1.569 rc --- etc/rc 18 Jan 2023 20:44:40 - 1.569 +++ etc/rc 25 Jan 2023 09:32:59 - @@ -251,7 +251,7 @@ reorder_libs() {

Re: hostctl: Change from fixed length to variable length

2023-01-05 Thread Masato Asou
I have updated my patch. From: YASUOKA Masahiko Date: Tue, 27 Dec 2022 11:58:34 +0900 (JST) > After diff, it doesn't use PAGE_SIZE any more. And VMware software > limit seems 1MB and changable by its configuration(*1). So we can't > say PVBUS_KVOP_MAXSIZE is enough. > > + * - Known pv

vmt.c: Change space character to TAB

2022-12-27 Thread Masato Asou
ok? -- ASOU Masato Index: sys/dev/pv/vmt.c === RCS file: /cvs/src/sys/dev/pv/vmt.c,v retrieving revision 1.28 diff -u -p -r1.28 vmt.c --- sys/dev/pv/vmt.c26 Dec 2022 04:09:14 - 1.28 +++ sys/dev/pv/vmt.c28 Dec 2022

Re: hostctl: Change from fixed length to variable length

2022-12-25 Thread Masato Asou
I was rewrited the patch for hostctl command and sys/dev/pvbus. From: "Theo de Raadt" Date: Tue, 11 Oct 2022 19:09:42 -0600 > An example of this mechanism is SIOCGIFCONF. The ioctl passes a pointer > to a struct containing length & pointer to data. See net/if.c ifconf() > There are other

Re: vmt is not closed

2022-12-13 Thread Masato Asou
From: Masato Asou Date: Tue, 13 Dec 2022 18:26:22 +0900 (JST) Delete #define VMT_DEBUG ok? -- ASOU Masato > comment, ok? > -- > ASOU Masato > > Index: sys/dev/pv/vmt.c > === > RCS file: /cvs/src/sys/dev/pv

vmt is not closed

2022-12-13 Thread Masato Asou
comment, ok? -- ASOU Masato Index: sys/dev/pv/vmt.c === RCS file: /cvs/src/sys/dev/pv/vmt.c,v retrieving revision 1.27 diff -u -p -r1.27 vmt.c --- sys/dev/pv/vmt.c3 Dec 2022 10:57:04 - 1.27 +++ sys/dev/pv/vmt.c13

Re: pvbus: pass M_ZERO properly

2022-12-07 Thread Masato Asou
ok asou@ From: YASUOKA Masahiko Date: Thu, 08 Dec 2022 11:35:33 +0900 (JST) > This is obvious. M_ZERO must be for 3rd argument. > > ok? > > Index: sys/dev/pv/pvbus.c > === > RCS file: /cvs/src/sys/dev/pv/pvbus.c,v > retrieving

Re: hostctl: Change from fixed length to variable length

2022-11-21 Thread Masato Asou
delete mbuhl from Cc:. From: YASUOKA Masahiko Date: Sat, 19 Nov 2022 16:37:47 +0900 (JST) > On Sat, 19 Nov 2022 14:41:18 +0900 (JST) > YASUOKA Masahiko wrote: >> On Wed, 12 Oct 2022 07:58:20 +0900 (JST) >> YASUOKA Masahiko wrote: >>> On Wed, 05 Oct 2022 13:37:35

Re: xenstore.c: return error number

2022-11-08 Thread Masato Asou
From: Martin Pieuchot Date: Tue, 8 Nov 2022 11:12:43 + > On 01/11/22(Tue) 15:26, Masato Asou wrote: >> Hi, >> >> Return error number instead of call panic(). > > Makes sense to me. Do you know how this error can occur? Is is a logic > error or are we trust

xenstore.c: return error number

2022-11-01 Thread Masato Asou
Hi, Return error number instead of call panic(). comment, ok? -- ASOU Masato diff --git a/sys/dev/pv/xenstore.c b/sys/dev/pv/xenstore.c index 1e4f15d30eb..dc89ba0fa6d 100644 --- a/sys/dev/pv/xenstore.c +++ b/sys/dev/pv/xenstore.c @@ -118,6 +118,7 @@ struct xs_msg { struct xs_msghdr

Re: hostctl: Change from fixed length to variable length

2022-10-04 Thread Masato Asou
From: "Theo de Raadt" Date: Tue, 04 Oct 2022 21:58:13 -0600 > Looking at these pieces: > > + sc->sc_rpc_buf = malloc(sc->sc_rpc_buflen, M_DEVBUF, M_NOWAIT); > ... > +vm_rpc_buf_realloc(struct vmt_softc *sc, size_t len) > +{ > + free(sc->sc_rpc_buf, M_DEVBUF, sc->sc_rpc_buflen); > +

hostctl: Change from fixed length to variable length

2022-10-04 Thread Masato Asou
Hi, The current VALUE length limit for the hostctl command for VMware is fixed 4096 bytes. I want to pass a longer VALUE. I made a patch to change it to variable length. commane, ok? Index: share/man/man4/pvbus.4 === RCS file:

Re: [please test] tsc: derive frequency on AMD CPUs from MSRs

2022-09-25 Thread Masato Asou
From: "Theo de Raadt" Date: Sun, 25 Sep 2022 18:29:12 -0600 > This is not helping. > > Please send Scott private replies regarding his diff. Oh, sorry. I will reply to Scott privately. -- ASOU Masato > Masato Asou wrote: > >> Hi, >> >> I have

Re: [please test] tsc: derive frequency on AMD CPUs from MSRs

2022-09-25 Thread Masato Asou
Hi, I have new AMD laptop. The dmesg is posted below: OpenBSD 7.2 (GENERIC.MP) #2: Mon Sep 26 09:09:17 JST 2022 a...@hp-obsd.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 7844245504 (7480MB) avail mem = 7589105664 (7237MB) random: good seed from bootblocks mpath0 at root

Re: [please test] tsc: derive frequency on AMD CPUs from MSRs

2022-09-25 Thread Masato Asou
Hi, The dmesg is posted below: OpenBSD 7.2 (GENERIC.MP) #2: Mon Sep 26 09:09:29 JST 2022 a...@amd-obsd.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 34256752640 (32669MB) avail mem = 33201127424 (31663MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0:

Re: Can't use hostname in hostctl command.

2022-08-29 Thread Masato Asou
> Hi! > > I can use ip and can'5 use hostname in hostctl command as blow: > > $ hostctl guestinfo.ip > 172.16.100.131 > $ hostctl guestinfo.hostname > hostctl: ioctl: Invalid argument I can read it after writing to hostname. However, I do not know how to read this in HOSTMACHINE. -- ASOU

Can't use hostname in hostctl command.

2022-08-29 Thread Masato Asou
Hi! I can use ip and can'5 use hostname in hostctl command as blow: $ hostctl guestinfo.ip 172.16.100.131 $ hostctl guestinfo.hostname hostctl: ioctl: Invalid argument man hostctl has the forrowing description: EXAMPLES The vmt(4) driver provides access to the ``guestinfo''

Re: [v5] amd64: simplify TSC sync testing

2022-08-01 Thread Masato Asou
From: Scott Cheloha Date: Mon, 1 Aug 2022 11:24:21 -0500 > On Mon, Aug 01, 2022 at 03:03:36PM +0900, Masato Asou wrote: >> Hi, Scott. >> >> I tested v5 patch on my ESXi on Ryzen7. >> It works fine for me. > > Is this the same Ryzen7 box as in the prior

Re: [v5] amd64: simplify TSC sync testing

2022-08-01 Thread Masato Asou
Hi, Scott. I tested v5 patch on my ESXi on Ryzen7. It works fine for me. $ sysctl -a | grep tsc kern.timecounter.hardware=tsc kern.timecounter.choice=i8254(0) acpihpet0(1000) tsc(2000) acpitimer0(1000) machdep.tscfreq=3593269150 machdep.invarianttsc=1 $ sysctl kern.timecounter

Re: [v5] amd64: simplify TSC sync testing

2022-07-31 Thread Masato Asou
Hi, Scott. Sorry, I missed v5 patch. I tested v5 patch on my Ryzen7 box. And I got failed message: $ sysctl -a | grep tsc kern.timecounter.choice=i8254(0) acpihpet0(1000) tsc(2000) acpitimer0(1000) machdep.tscfreq=3593259787 machdep.invarianttsc=1 $ sysctl kern.timecounter

Re: [v4] amd64: simplify TSC sync testing

2022-07-31 Thread Masato Asou
Hi, Scott I tested your patch on my on ESXi on Ryzen7 box. It works fine for me. $ sysctl -a | grep tsc kern.timecounter.hardware=tsc kern.timecounter.choice=i8254(0) acpihpet0(1000) tsc(2000) acpitimer0(1000) machdep.tscfreq=3593261949 machdep.invarianttsc=1 $ sysctl kern.timecounter

Re: [v4] amd64: simplify TSC sync testing

2022-07-31 Thread Masato Asou
Hi, Scott I tested your patch on my Ryzen7 box. And I got failed message: $ sysctl -a | grep tsc kern.timecounter.choice=i8254(0) acpihpet0(1000) tsc(2000) acpitimer0(1000) machdep.tscfreq=3593244667 machdep.invarianttsc=1 $ sysctl kern.timecounter kern.timecounter.tick=1

Re: [v3] amd64: simplify TSC sync testing

2022-07-20 Thread Masato Asou
Hi, >> On Jul 20, 2022, at 01:48, Masato Asou wrote: >> >> Sorry, my latest reply. >> >> I tested your patch on my Proxmox Virtual Environment on Ryzen7 box. >> It works fine for me. > > This VM doesn't have the ITSC CPU flag, > how is it usin

Re: [v3] amd64: simplify TSC sync testing

2022-07-20 Thread Masato Asou
Sorry, my latest reply. I tested your patch on my Proxmox Virtual Environment on Ryzen7 box. It works fine for me. OpenBSD 7.1-current (GENERIC.MP) #1: Wed Jul 20 14:15:23 JST 2022 a...@pve-obsd.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 17162952704 (16367MB) avail mem =

Re: Is rdomain correct for rtable in man ifconfig?

2022-07-14 Thread Masato Asou
UOKA Masahiko(yasu...@openbsd.org) on 2022.07.14 15:41:54 +0900: >> Hello, >> >> On Thu, 14 Jul 2022 14:09:52 +0900 (JST) >> Masato Asou wrote: >> > The TUNNEL in the man ifconfig(8) is described as follows: >> > >> > TUNNEL >> > >>

Re: Is rdomain correct for rtable in man ifconfig?

2022-07-14 Thread Masato Asou
t; On Thu, 14 Jul 2022 14:09:52 +0900 (JST) > Masato Asou wrote: >> The TUNNEL in the man ifconfig(8) is described as follows: >> >> TUNNEL >> >> tunneldomain rtable >> ^^here >>

Is rdomain correct for rtable in man ifconfig?

2022-07-13 Thread Masato Asou
Hi, The TUNNEL in the man ifconfig(8) is described as follows: TUNNEL tunneldomain rtable ^^here Use routing table rtable instead of the default table. The ^^here tunnel does not need to terminate in the

Re: [v3] amd64: simplify TSC sync testing

2022-07-07 Thread Masato Asou
Hi, I tested your patch on my OpenSUSE + Xen on Ryzen7 box. It works fine for me. OpenBSD 7.1-current (GENERIC.MP) #1: Thu Jul 7 15:22:32 JST 2022 a...@xen-obsd1.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 8556376064 (8159MB) avail mem = 8279695360 (7896MB) random: good

Re: [v3] amd64: simplify TSC sync testing

2022-07-05 Thread Masato Asou
Hi, Scotto. I tested your patch on my Ryzen7 box. And I got failed message: tsc: cpu0/cpu1: sync test round 1/2 failed tsc: cpu0/cpu1: cpu1: 1 lags 36 cycles OpenBSD 7.1-current (GENERIC.MP) #3: Wed Jul 6 10:59:06 JST 2022

Fix whitespace dev/fdt/files.fdt

2022-04-24 Thread Masato Asou
Change whitespace to TAB. ok? Index: sys/dev/fdt/files.fdt === RCS file: /cvs/src/sys/dev/fdt/files.fdt,v retrieving revision 1.162 diff -u -p -r1.162 files.fdt --- sys/dev/fdt/files.fdt 30 Jan 2022 21:40:50 - 1.162

Re: hostctl does not work on Xen

2021-10-11 Thread Masato Asou
From: Masato Asou Date: Sat, 09 Oct 2021 15:29:23 +0900 (JST) > From: Brian Brombacher > Date: Fri, 8 Oct 2021 11:22:23 -0400 > >> I can see from the Ubuntu dmesg that it’s Xen 4.11.4. What mode are you >> running the OpenBSD vm in (PVH or HVM)? Provide your c

Re: hostctl does not work on Xen

2021-10-09 Thread Masato Asou
us=virtio,format=qcow2 -- ASOU Masato > >> On Oct 8, 2021, at 12:41 AM, Masato Asou wrote: >> >> Attached obsd69-dmesg.txt and ubuntu-dmesg.txt. >> >> regards. >> -- >> ASOU Masato >> >> From: Brian Brombacher >> Date: Thu, 7 Oct 2021

Re: hostctl does not work on Xen

2021-10-07 Thread Masato Asou
Attached obsd69-dmesg.txt and ubuntu-dmesg.txt. regards. -- ASOU Masato From: Brian Brombacher Date: Thu, 7 Oct 2021 23:21:59 -0400 >> On Oct 7, 2021, at 9:46 PM, Masato Asou wrote: >> >> How can I use the hostctl command on Xen virtual machine? >> >> The host

hostctl does not work on Xen

2021-10-07 Thread Masato Asou
How can I use the hostctl command on Xen virtual machine? The hostctl command doesn't work on my Ubuntu (bear metal PC) + Xen + OpenBSD 6.9 release as follows: $ hostctl device hostctl: open: /dev/pvbus0: Operation not supported by device $ doas hostctl device doas (a...@obsd69.my.domain)

Re: Bad comparison between double and uint64_t

2021-06-24 Thread Masato Asou
Hi Ali, From: Ali Farzanrad Date: Thu, 24 Jun 2021 07:25:24 + > Hi Masato, > > Masato Asou wrote: >> Hi Ali, >> >> In this case, ULLONG_MAX is implicitly cast to double, isn't it? > > Yes it is implicitly cast to double, but due to floating poi

Re: Bad comparison between double and uint64_t

2021-06-23 Thread Masato Asou
Hi Ali, In this case, ULLONG_MAX is implicitly cast to double, isn't it? Do you have any problems if you don't cast to double? -- ASOU Masato From: Ali Farzanrad Date: Wed, 23 Jun 2021 20:24:27 + > Oh, my bad, sorry. > I assumed that val is always integer. > I guess it is better to

How to debug kernel core with lldb

2021-05-20 Thread Masato Asou
Hi tech, Does anybudy know how to debug kernel core with lldb? I am useing OpenBSD current. I know how to debug kernel core with target kvm command of gdb by man crash. However, lldb does not have taeget kvm command. Has target kvm command implemented yet? -- ASOU Masato

[patch] gdb: correct kernel core backtrace

2021-04-26 Thread Masato Asou
I have investigated the kernel core with gdb and found that the backtrace command does not work correctly. $ doas /usr/bin/gdb /usr/obj/sys/arch/amd64/compile/GENERIC.MP/bsd.gdb doas (a...@asou-kernelcore-tmp.soum.co.jp) password: GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is

Re: diff: efiboot: alignment for media which has IoAlign > 1

2021-03-14 Thread Masato Asou
Hi, I was tested attached patch on following machines and worked fine on those machines. - ESXi vitrual machine - AMD TYZEN 7 - Intel corei7 -- ASOU Masato From: YASUOKA Masahiko Date: Thu, 11 Mar 2021 15:05:11 +0900 (JST) > On Wed, 10 Mar 2021 13:15:58 +0100 (CET) > Mark Kettenis

Re: Big endian and strict alignment

2021-01-19 Thread Masato Asou
From: Masato Asou Date: Tue, 19 Jan 2021 17:02:42 +0900 (JST) > お客さんから「何か情報知ってますか?」という問い合わせがあったので、ど > なたか情報をお持ちの方がいたら、情報提供をお願いします。 Sorry. I made a mistake in the address of the email. -- ASOU Masato

Big endian and strict alignment

2021-01-19 Thread Masato Asou
お客さんから「何か情報知ってますか?」という問い合わせがあったので、ど なたか情報をお持ちの方がいたら、情報提供をお願いします。 要望としては、以下の二点 (いずれか一方でも可) を満たす Raspberry Pi の ように手軽に入手できるマシンありませんか?というものです。 - Big endian - Strict alignment: MIPS のように WORD (4byte) の読み書きは 4byte 境 界でなければならない。 -- ASOU Masato

Re: [PATCH] Fix a bug where GDB could not display symbols

2020-11-30 Thread Masato Asou
offsets[i] = displacement; + } + + if (changed) + objfile_relocate (symfile_objfile, new_offsets); + + do_cleanups (old_chain); + exec_set_section_offsets(displacement, displacement, displacement); + } + return 0; + }

[PATCH] Fix a bug where GDB could not display symbols

2020-10-07 Thread Masato Asou
I refferd to the core of static linked in GDB. However, the backtrace command did not display the symbols correctly. $ cat main.c #include void sub2(int argc, char *argv[]) { int i; for (int i = 0; i <= argc; i++) argv[i][0] = '\0'; } void sub1(int argc, char

Re: Is uvm_map_isavail() returning 1 instead of -1?

2019-12-13 Thread Masato Asou
From: "Theo de Raadt" Subject: Re: Is uvm_map_isavail() returning 1 instead of -1? Date: Fri, 13 Dec 2019 15:54:10 -0700 > Masato Asou wrote: > >> Is this correct? >> >> Index: sys/uvm/uvm_map.c >> =

Is uvm_map_isavail() returning 1 instead of -1?

2019-12-13 Thread Masato Asou
Is this correct? Index: sys/uvm/uvm_map.c === RCS file: /cvs/src/sys/uvm/uvm_map.c,v retrieving revision 1.259 diff -u -p -r1.259 uvm_map.c --- sys/uvm/uvm_map.c 12 Dec 2019 11:12:36 - 1.259 +++ sys/uvm/uvm_map.c 13 Dec

thrsleep_unlock: check pointer against NULL

2019-12-04 Thread Masato Asou
ok? Index: sys/kern/kern_synch.c === RCS file: /cvs/src/sys/kern/kern_synch.c,v retrieving revision 1.155 diff -u -p -r1.155 kern_synch.c --- sys/kern/kern_synch.c 30 Nov 2019 11:19:17 - 1.155 +++ sys/kern/kern_synch.c

fwide() does not unlock if error was occurred

2019-12-02 Thread Masato Asou
fwide() does not unlock if error was occurred. ok? Index: lib/libc/stdio/fwide.c === RCS file: /cvs/src/lib/libc/stdio/fwide.c,v retrieving revision 1.5 diff -u -p -r1.5 fwide.c --- lib/libc/stdio/fwide.c 31 Aug 2015 02:53:57

Re: OpenBSD 6.x and wxallowed

2019-10-20 Thread Masato Asou
From: "Nelson H. F. Beebe" Date: Fri, 18 Oct 2019 07:39:26 -0600 > Has anyone looked into the problem of enumerating packages that are > installed in the /usr/local tree that actually NEED simultaneous write > and execute access? You can find that as below: $ grep -rHI USE_WXNEEDED /usr/ports/

Question about man 2 fcntl

2019-09-04 Thread Masato Asou
The following statement is a part of man 2 fctl. [EINTR]The argument cmd is invalid. The argument cmd is F_SETLKW, and the function was interrupted by a signal. Will EINVAL be returned in the case of 'The

libedit: Does not run input command in vi mode

2019-09-02 Thread Masato Asou
Does not run input command by vi editor with vi mode. I do the following: 1. set vi mode. $ echo "bind -v" > ~/.editrc 2. launch /usr/bin/ftp command. $ ftp 3. launch vi editor with ESC + v. ftp> ESC + v 4. input "help" in vi editor. i + help + ESC + :wq 5. then 'help' command

Re: /bin/cp: Incorrect checking the return value

2019-08-18 Thread Masato Asou
From: "Theo de Raadt" Date: Fri, 16 Aug 2019 10:01:25 -0600 > Masato Asou wrote: > >> Incorrect checking the return value of malloc and system calls in >> /bin/cp. > > The NULL vs ! checks, I cannot agree with those. Their effect is > identical and it i

Re: /bin/cp: Incorrect checking the return value

2019-08-16 Thread Masato Asou
From: Otto Moerbeek Date: Fri, 16 Aug 2019 13:56:37 +0200 > On Fri, Aug 16, 2019 at 05:44:35PM +0900, Masato Asou wrote: > >> Incorrect checking the return value of malloc and system calls in >> /bin/cp. >> >> ok? > > Altough I indeed prefer to check

/bin/cp: Incorrect checking the return value

2019-08-16 Thread Masato Asou
Incorrect checking the return value of malloc and system calls in /bin/cp. ok? Index: utils.c === RCS file: /cvs/src/bin/cp/utils.c,v retrieving revision 1.48 diff -u -p -U10 -r1.48 utils.c --- utils.c 28 Jun 2019 13:34:58 -

Re: Use `if (retval == -1)' instead of 'if (retval < 0)'

2019-08-14 Thread Masato Asou
Additional information. From: Masato Asou Subject: Use `if (retval == -1)' instead of 'if (retval < 0)' Date: Wed, 14 Aug 2019 13:42:13 +0900 (JST) > Hi tech, > > Use `if (retval == -1)' instead of 'if (retval < 0)' when check the > return value of system call. > > How

Use `if (retval == -1)' instead of 'if (retval < 0)'

2019-08-13 Thread Masato Asou
Hi tech, Use `if (retval == -1)' instead of 'if (retval < 0)' when check the return value of system call. How about it? RCS file: /cvs/src/lib/libedit/readline.c,v retrieving revision 1.28 diff -u -p -u -r1.28 readline.c --- readline.c 28 Jun 2019 13:32:42 - 1.28 +++ readline.c 14

Re: Why both media and -mediaopt doesn't specify at the same time?

2019-02-14 Thread Masato Asou
From: YASUOKA Masahiko Date: Thu, 14 Feb 2019 15:34:26 +0900 (JST) > On Thu, 14 Feb 2019 08:30:45 +0900 (JST) > Masato Asou wrote: >> From: Claudio Jeker >> Date: Wed, 13 Feb 2019 14:25:58 +0100 >> >>> On Wed, Feb 13, 2019 at 11:04:02AM +0900, Masato Asou

Re: Why both media and -mediaopt doesn't specify at the same time?

2019-02-13 Thread Masato Asou
From: Claudio Jeker Date: Wed, 13 Feb 2019 14:25:58 +0100 > On Wed, Feb 13, 2019 at 11:04:02AM +0900, Masato Asou wrote: >> Hi, >> >> When I execute `ifconfig media XX -mediaopt YY' command, it occured >> error as below. >> >> $ doas ifconfig em

Why both media and -mediaopt doesn't specify at the same time?

2019-02-12 Thread Masato Asou
Hi, When I execute `ifconfig media XX -mediaopt YY' command, it occured error as below. $ doas ifconfig em1 media 100baseTX -mediaopt full-duplex ifconfig: may not issue both `media' and `-mediaopt' $ echo $? 1 Does anyone knows this reason? I think following patch is works fine. $ cvs diff

Re: SEGV was occurred in libedit

2018-10-10 Thread Masato Asou
Hi, From: YASUOKA Masahiko Date: Wed, 10 Oct 2018 13:46:10 +0900 (JST) > initialize new line. > > See #1086, "lastline" is set to previous lastline. Then new line is not > initialized. > > I think the following diff is better since it initializes the line in > the same way for first line. >

SEGV was occurred in libedit

2018-10-09 Thread Masato Asou
Hi, When I use /usr/bin/bc command with MALLOC_OPTIONS=UJ, SEGV was occurred in libedit. $ MALLOC_OPTIONS=UJ /usr/bin/bc 10 + 20 + 30 + 40 + 50 + 60 + 70 + 80 + 90 + Segmentation fault (core dumped) $ /usr/bin/gdb /usr/bin/bc bc.core GNU gdb 6.3 ... snip

Next command of GDB does not work properly unusual

2018-06-28 Thread Masato Asou
Hi tech, I have a problem and I have ad hoc patch to solve this problem. However, this patch is AD HOC. Does anybody have correct solution? The next command of GDB does not work properly. I use OpenBSD 6.3 and /usr/bin/gdb (GDB 6.3). When I debuging my program with next command, I expect stop