Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when setting "encrypted" field to true during net.smtp client connection #23289

Closed
khalyomede opened this issue Dec 27, 2024 · 0 comments · Fixed by #23290
Closed
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@khalyomede
Copy link
Contributor

khalyomede commented Dec 27, 2024

Describe the bug

A segementation fault is thrown when connecting to an SMTP server with encrypted: true option.

Reproduction Steps

module main

import net.smtp { new_client, Mail }

fn main() {
  mut client := new_client(
    server: "sandbox.smtp.mailtrap.io"
    port: 2525
    username: "**************"
    password: "**************"
    from: "Company <[email protected]>"
    starttls: true
    encrypted: true
  ) or { panic(err) }

  mail := Mail{
    to: "[email protected]"
    subject: "Sending an email from local"
    body_type: .text
    body: "Test"
  }

  client.send(mail) or { panic(err) }

  println("Email sent.")
}

Expected Behavior

To have a compile time error (or to send the email if no errors)

Current Behavior

Segmentation fault:

signal 11: segmentation fault

Possible Solution

No response

Additional Information/Context

No response

V version

0.4.9

Environment details (OS name and version, etc.)

V full version: V 0.4.9 e9bdfa1
OS: linux, N/A
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz

getwd: /home/v
vexe: /opt/v/v
vexe mtime: 2024-12-27 17:08:25

vroot: OK, value: /opt/v
VMODULES: OK, value: /root/.vmodules
VTMP: OK, value: /tmp/v_0

env VFLAGS: "-cc gcc"

Git version: git version 2.30.6
Git vroot status: e9bdfa1
.git/config present: true

CC version: cc (Alpine 10.2.1_pre1) 10.2.1 20201203
emcc version: N/A
thirdparty/tcc status: thirdparty-linuxmusl-amd64 a3e24da2

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Huly®: V_0.6-21721

@khalyomede khalyomede added the Bug This tag is applied to issues which reports bugs. label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant